@solana-name-service/sns-sdk-kit 0.9.5-beta → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/cjs/address/getDomainsForAddress.cjs.map +1 -1
  2. package/dist/cjs/address/getNftsForAddress.cjs.map +1 -1
  3. package/dist/cjs/bindings/burnDomain.cjs.map +1 -1
  4. package/dist/cjs/bindings/createNameRegistry.cjs.map +1 -1
  5. package/dist/cjs/bindings/createRecord.cjs.map +1 -1
  6. package/dist/cjs/bindings/createReverse.cjs.map +1 -1
  7. package/dist/cjs/bindings/createSubdomain.cjs.map +1 -1
  8. package/dist/cjs/bindings/deleteNameRegistry.cjs.map +1 -1
  9. package/dist/cjs/bindings/deleteRecord.cjs.map +1 -1
  10. package/dist/cjs/bindings/registerDomain.cjs.map +1 -1
  11. package/dist/cjs/bindings/registerWithNft.cjs.map +1 -1
  12. package/dist/cjs/bindings/setPrimaryDomain.cjs.map +1 -1
  13. package/dist/cjs/bindings/transferDomain.cjs.map +1 -1
  14. package/dist/cjs/bindings/transferSubdomain.cjs.map +1 -1
  15. package/dist/cjs/bindings/updateNameRegistry.cjs.map +1 -1
  16. package/dist/cjs/bindings/updateRecord.cjs.map +1 -1
  17. package/dist/cjs/bindings/validateRoa.cjs.map +1 -1
  18. package/dist/cjs/bindings/validateRoaEthereum.cjs.map +1 -1
  19. package/dist/cjs/bindings/writeRoa.cjs.map +1 -1
  20. package/dist/cjs/domain/getAllDomains.cjs.map +1 -1
  21. package/dist/cjs/domain/getSubdomains.cjs +1 -1
  22. package/dist/cjs/domain/getSubdomains.cjs.map +1 -1
  23. package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs.map +1 -1
  24. package/dist/cjs/instructions/burnDomainInstruction.cjs.map +1 -1
  25. package/dist/cjs/instructions/createAtaInstruction.cjs +1 -1
  26. package/dist/cjs/instructions/createAtaInstruction.cjs.map +1 -1
  27. package/dist/cjs/instructions/createInstructionV3.cjs.map +1 -1
  28. package/dist/cjs/instructions/createNameRegistryInstruction.cjs.map +1 -1
  29. package/dist/cjs/instructions/createReverseInstruction.cjs.map +1 -1
  30. package/dist/cjs/instructions/createSplitV2Instruction.cjs.map +1 -1
  31. package/dist/cjs/instructions/createV2Instruction.cjs.map +1 -1
  32. package/dist/cjs/instructions/createWithNftInstruction.cjs.map +1 -1
  33. package/dist/cjs/instructions/deleteNameRegistryInstruction.cjs.map +1 -1
  34. package/dist/cjs/instructions/deleteRecordInstruction.cjs.map +1 -1
  35. package/dist/cjs/instructions/reallocInstruction.cjs.map +1 -1
  36. package/dist/cjs/instructions/registerFavoriteInstruction.cjs.map +1 -1
  37. package/dist/cjs/instructions/transferInstruction.cjs.map +1 -1
  38. package/dist/cjs/instructions/updateNameRegistryInstruction.cjs.map +1 -1
  39. package/dist/cjs/instructions/updateRecordInstruction.cjs.map +1 -1
  40. package/dist/cjs/instructions/validateRoaEthereumInstruction.cjs.map +1 -1
  41. package/dist/cjs/instructions/validateRoaInstruction.cjs.map +1 -1
  42. package/dist/cjs/instructions/writeRoaInstruction.cjs.map +1 -1
  43. package/dist/cjs/states/nft.cjs.map +1 -1
  44. package/dist/esm/address/getDomainsForAddress.mjs.map +1 -1
  45. package/dist/esm/address/getNftsForAddress.mjs.map +1 -1
  46. package/dist/esm/bindings/burnDomain.mjs.map +1 -1
  47. package/dist/esm/bindings/createNameRegistry.mjs.map +1 -1
  48. package/dist/esm/bindings/createRecord.mjs.map +1 -1
  49. package/dist/esm/bindings/createReverse.mjs.map +1 -1
  50. package/dist/esm/bindings/createSubdomain.mjs.map +1 -1
  51. package/dist/esm/bindings/deleteNameRegistry.mjs.map +1 -1
  52. package/dist/esm/bindings/deleteRecord.mjs.map +1 -1
  53. package/dist/esm/bindings/registerDomain.mjs.map +1 -1
  54. package/dist/esm/bindings/registerWithNft.mjs.map +1 -1
  55. package/dist/esm/bindings/setPrimaryDomain.mjs.map +1 -1
  56. package/dist/esm/bindings/transferDomain.mjs.map +1 -1
  57. package/dist/esm/bindings/transferSubdomain.mjs.map +1 -1
  58. package/dist/esm/bindings/updateNameRegistry.mjs.map +1 -1
  59. package/dist/esm/bindings/updateRecord.mjs.map +1 -1
  60. package/dist/esm/bindings/validateRoa.mjs.map +1 -1
  61. package/dist/esm/bindings/validateRoaEthereum.mjs.map +1 -1
  62. package/dist/esm/bindings/writeRoa.mjs.map +1 -1
  63. package/dist/esm/domain/getAllDomains.mjs.map +1 -1
  64. package/dist/esm/domain/getSubdomains.mjs +1 -1
  65. package/dist/esm/domain/getSubdomains.mjs.map +1 -1
  66. package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs.map +1 -1
  67. package/dist/esm/instructions/burnDomainInstruction.mjs.map +1 -1
  68. package/dist/esm/instructions/createAtaInstruction.mjs +1 -1
  69. package/dist/esm/instructions/createAtaInstruction.mjs.map +1 -1
  70. package/dist/esm/instructions/createInstructionV3.mjs.map +1 -1
  71. package/dist/esm/instructions/createNameRegistryInstruction.mjs.map +1 -1
  72. package/dist/esm/instructions/createReverseInstruction.mjs.map +1 -1
  73. package/dist/esm/instructions/createSplitV2Instruction.mjs.map +1 -1
  74. package/dist/esm/instructions/createV2Instruction.mjs.map +1 -1
  75. package/dist/esm/instructions/createWithNftInstruction.mjs.map +1 -1
  76. package/dist/esm/instructions/deleteNameRegistryInstruction.mjs.map +1 -1
  77. package/dist/esm/instructions/deleteRecordInstruction.mjs.map +1 -1
  78. package/dist/esm/instructions/reallocInstruction.mjs.map +1 -1
  79. package/dist/esm/instructions/registerFavoriteInstruction.mjs.map +1 -1
  80. package/dist/esm/instructions/transferInstruction.mjs.map +1 -1
  81. package/dist/esm/instructions/updateNameRegistryInstruction.mjs.map +1 -1
  82. package/dist/esm/instructions/updateRecordInstruction.mjs.map +1 -1
  83. package/dist/esm/instructions/validateRoaEthereumInstruction.mjs.map +1 -1
  84. package/dist/esm/instructions/validateRoaInstruction.mjs.map +1 -1
  85. package/dist/esm/instructions/writeRoaInstruction.mjs.map +1 -1
  86. package/dist/esm/node_modules/@solana-program/token/dist/src/index.mjs +1 -1
  87. package/dist/esm/states/nft.mjs.map +1 -1
  88. package/dist/types/bindings/burnDomain.d.ts +2 -2
  89. package/dist/types/bindings/createNameRegistry.d.ts +2 -2
  90. package/dist/types/bindings/createRecord.d.ts +2 -2
  91. package/dist/types/bindings/createReverse.d.ts +2 -2
  92. package/dist/types/bindings/createSubdomain.d.ts +2 -2
  93. package/dist/types/bindings/deleteNameRegistry.d.ts +2 -2
  94. package/dist/types/bindings/deleteRecord.d.ts +2 -2
  95. package/dist/types/bindings/registerDomain.d.ts +2 -2
  96. package/dist/types/bindings/registerWithNft.d.ts +2 -2
  97. package/dist/types/bindings/setPrimaryDomain.d.ts +2 -2
  98. package/dist/types/bindings/transferDomain.d.ts +2 -2
  99. package/dist/types/bindings/transferSubdomain.d.ts +2 -2
  100. package/dist/types/bindings/updateNameRegistry.d.ts +2 -2
  101. package/dist/types/bindings/updateRecord.d.ts +2 -2
  102. package/dist/types/bindings/validateRoa.d.ts +2 -2
  103. package/dist/types/bindings/validateRoaEthereum.d.ts +2 -2
  104. package/dist/types/bindings/writeRoa.d.ts +2 -2
  105. package/dist/types/codecs.d.ts +1 -1
  106. package/dist/types/instructions/allocateAndPostRecordInstruction.d.ts +2 -2
  107. package/dist/types/instructions/burnDomainInstruction.d.ts +2 -2
  108. package/dist/types/instructions/createAtaInstruction.d.ts +2 -2
  109. package/dist/types/instructions/createInstructionV3.d.ts +2 -2
  110. package/dist/types/instructions/createNameRegistryInstruction.d.ts +2 -2
  111. package/dist/types/instructions/createReverseInstruction.d.ts +2 -2
  112. package/dist/types/instructions/createSplitV2Instruction.d.ts +2 -2
  113. package/dist/types/instructions/createV2Instruction.d.ts +2 -2
  114. package/dist/types/instructions/createWithNftInstruction.d.ts +2 -2
  115. package/dist/types/instructions/deleteNameRegistryInstruction.d.ts +2 -2
  116. package/dist/types/instructions/deleteRecordInstruction.d.ts +2 -2
  117. package/dist/types/instructions/reallocInstruction.d.ts +2 -2
  118. package/dist/types/instructions/registerFavoriteInstruction.d.ts +2 -2
  119. package/dist/types/instructions/transferInstruction.d.ts +2 -2
  120. package/dist/types/instructions/updateNameRegistryInstruction.d.ts +2 -2
  121. package/dist/types/instructions/updateRecordInstruction.d.ts +2 -2
  122. package/dist/types/instructions/validateRoaEthereumInstruction.d.ts +2 -2
  123. package/dist/types/instructions/validateRoaInstruction.d.ts +2 -2
  124. package/dist/types/instructions/writeRoaInstruction.d.ts +2 -2
  125. package/dist/types/record/verifyRecordRightOfAssociation.d.ts +1 -1
  126. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"setPrimaryDomain.mjs","sources":["../../../src/bindings/setPrimaryDomain.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, IInstruction, Rpc } from \"@solana/kit\";\r\n\r\nimport {\r\n NAME_OFFERS_ADDRESS,\r\n ROOT_DOMAIN_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { registerFavoriteInstruction } from \"../instructions/registerFavoriteInstruction\";\r\nimport { PrimaryDomainState } from \"../states/primaryDomain\";\r\nimport { RegistryState } from \"../states/registry\";\r\n\r\nexport interface SetPrimaryDomainParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n domainAddress: Address;\r\n owner: Address;\r\n}\r\n\r\n/**\r\n * Sets the primary domain for the specified owner.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `domainAddress`: The address of the domain to be set as primary.\r\n * - `owner`: The address of the domain owner.\r\n * @returns A promise which resolves to the set primary domain instruction.\r\n */\r\nexport const setPrimaryDomain = async ({\r\n rpc,\r\n domainAddress,\r\n owner,\r\n}: SetPrimaryDomainParams): Promise<IInstruction> => {\r\n const [registry, primaryAddress] = await Promise.all([\r\n RegistryState.retrieve(rpc, domainAddress),\r\n PrimaryDomainState.getAddress(NAME_OFFERS_ADDRESS, owner),\r\n ]);\r\n\r\n const parent =\r\n registry.parentName !== ROOT_DOMAIN_ADDRESS\r\n ? registry.parentName\r\n : undefined;\r\n\r\n const ix = new registerFavoriteInstruction().getInstruction(\r\n NAME_OFFERS_ADDRESS,\r\n domainAddress,\r\n primaryAddress,\r\n owner,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n parent\r\n );\r\n return ix;\r\n};\r\n"],"names":["setPrimaryDomain","async","rpc","domainAddress","owner","registry","primaryAddress","Promise","all","RegistryState","retrieve","PrimaryDomainState","getAddress","NAME_OFFERS_ADDRESS","parent","parentName","ROOT_DOMAIN_ADDRESS","undefined","registerFavoriteInstruction","getInstruction","SYSTEM_PROGRAM_ADDRESS"],"mappings":"4UA0BO,MAAMA,EAAmBC,OAC9BC,MACAC,gBACAC,YAEA,MAAOC,EAAUC,SAAwBC,QAAQC,IAAI,CACnDC,EAAcC,SAASR,EAAKC,GAC5BQ,EAAmBC,WAAWC,EAAqBT,KAG/CU,EACJT,EAASU,aAAeC,EACpBX,EAASU,gBACTE,EAUN,OARW,IAAIC,GAA8BC,eAC3CN,EACAV,EACAG,EACAF,EACAgB,EACAN,EAEO"}
1
+ {"version":3,"file":"setPrimaryDomain.mjs","sources":["../../../src/bindings/setPrimaryDomain.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, Instruction, Rpc } from \"@solana/kit\";\r\n\r\nimport {\r\n NAME_OFFERS_ADDRESS,\r\n ROOT_DOMAIN_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { registerFavoriteInstruction } from \"../instructions/registerFavoriteInstruction\";\r\nimport { PrimaryDomainState } from \"../states/primaryDomain\";\r\nimport { RegistryState } from \"../states/registry\";\r\n\r\nexport interface SetPrimaryDomainParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n domainAddress: Address;\r\n owner: Address;\r\n}\r\n\r\n/**\r\n * Sets the primary domain for the specified owner.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `domainAddress`: The address of the domain to be set as primary.\r\n * - `owner`: The address of the domain owner.\r\n * @returns A promise which resolves to the set primary domain instruction.\r\n */\r\nexport const setPrimaryDomain = async ({\r\n rpc,\r\n domainAddress,\r\n owner,\r\n}: SetPrimaryDomainParams): Promise<Instruction> => {\r\n const [registry, primaryAddress] = await Promise.all([\r\n RegistryState.retrieve(rpc, domainAddress),\r\n PrimaryDomainState.getAddress(NAME_OFFERS_ADDRESS, owner),\r\n ]);\r\n\r\n const parent =\r\n registry.parentName !== ROOT_DOMAIN_ADDRESS\r\n ? registry.parentName\r\n : undefined;\r\n\r\n const ix = new registerFavoriteInstruction().getInstruction(\r\n NAME_OFFERS_ADDRESS,\r\n domainAddress,\r\n primaryAddress,\r\n owner,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n parent\r\n );\r\n return ix;\r\n};\r\n"],"names":["setPrimaryDomain","async","rpc","domainAddress","owner","registry","primaryAddress","Promise","all","RegistryState","retrieve","PrimaryDomainState","getAddress","NAME_OFFERS_ADDRESS","parent","parentName","ROOT_DOMAIN_ADDRESS","undefined","registerFavoriteInstruction","getInstruction","SYSTEM_PROGRAM_ADDRESS"],"mappings":"4UA0BO,MAAMA,EAAmBC,OAC9BC,MACAC,gBACAC,YAEA,MAAOC,EAAUC,SAAwBC,QAAQC,IAAI,CACnDC,EAAcC,SAASR,EAAKC,GAC5BQ,EAAmBC,WAAWC,EAAqBT,KAG/CU,EACJT,EAASU,aAAeC,EACpBX,EAASU,gBACTE,EAUN,OARW,IAAIC,GAA8BC,eAC3CN,EACAV,EACAG,EACAF,EACAgB,EACAN,EAEO"}
@@ -1 +1 @@
1
- {"version":3,"file":"transferDomain.mjs","sources":["../../../src/bindings/transferDomain.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, IInstruction, Rpc } from \"@solana/kit\";\r\n\r\nimport { NAME_PROGRAM_ADDRESS } from \"../constants/addresses\";\r\nimport { TransferInstruction } from \"../instructions/transferInstruction\";\r\nimport { RegistryState } from \"../states/registry\";\r\nimport { deriveAddress } from \"../utils/deriveAddress\";\r\n\r\ninterface TransferDomainParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n domain: string;\r\n newOwner: Address;\r\n classAddress?: Address;\r\n parentAddress?: Address;\r\n parentOwner?: Address;\r\n}\r\n\r\n/**\r\n * Transfers a domain to a new owner.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `domain`: The name of the domain to be transferred.\r\n * - `newOwner`: The address of the new owner of the domain.\r\n * - `classAddress`: (Optional) The address of the class associated with the domain.\r\n * - `parentAddress`: (Optional) The address of the parent domain.\r\n * - `parentOwner`: (Optional) The address of the parent domain owner.\r\n * @returns A promise that resolves to the transfer domain instruction.\r\n */\r\nexport const transferDomain = async ({\r\n rpc,\r\n domain,\r\n newOwner,\r\n classAddress,\r\n parentAddress,\r\n parentOwner,\r\n}: TransferDomainParams): Promise<IInstruction> => {\r\n const domainAddress = await deriveAddress(\r\n domain,\r\n parentAddress,\r\n classAddress\r\n );\r\n\r\n const currentOwner =\r\n classAddress || (await RegistryState.retrieve(rpc, domainAddress)).owner;\r\n\r\n const transferInstr = new TransferInstruction({ newOwner }).getInstruction(\r\n NAME_PROGRAM_ADDRESS,\r\n domainAddress,\r\n currentOwner,\r\n classAddress,\r\n parentAddress,\r\n parentOwner\r\n );\r\n\r\n return transferInstr;\r\n};\r\n"],"names":["transferDomain","async","rpc","domain","newOwner","classAddress","parentAddress","parentOwner","domainAddress","deriveAddress","currentOwner","RegistryState","retrieve","owner","TransferInstruction","getInstruction","NAME_PROGRAM_ADDRESS"],"mappings":"wQA4BaA,EAAiBC,OAC5BC,MACAC,SACAC,WACAC,eACAC,gBACAC,kBAEA,MAAMC,QAAsBC,EAC1BN,EACAG,EACAD,GAGIK,EACJL,UAAuBM,EAAcC,SAASV,EAAKM,IAAgBK,MAWrE,OATsB,IAAIC,EAAoB,CAAEV,aAAYW,eAC1DC,EACAR,EACAE,EACAL,EACAC,EACAC,EAGkB"}
1
+ {"version":3,"file":"transferDomain.mjs","sources":["../../../src/bindings/transferDomain.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, Instruction, Rpc } from \"@solana/kit\";\r\n\r\nimport { NAME_PROGRAM_ADDRESS } from \"../constants/addresses\";\r\nimport { TransferInstruction } from \"../instructions/transferInstruction\";\r\nimport { RegistryState } from \"../states/registry\";\r\nimport { deriveAddress } from \"../utils/deriveAddress\";\r\n\r\ninterface TransferDomainParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n domain: string;\r\n newOwner: Address;\r\n classAddress?: Address;\r\n parentAddress?: Address;\r\n parentOwner?: Address;\r\n}\r\n\r\n/**\r\n * Transfers a domain to a new owner.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `domain`: The name of the domain to be transferred.\r\n * - `newOwner`: The address of the new owner of the domain.\r\n * - `classAddress`: (Optional) The address of the class associated with the domain.\r\n * - `parentAddress`: (Optional) The address of the parent domain.\r\n * - `parentOwner`: (Optional) The address of the parent domain owner.\r\n * @returns A promise that resolves to the transfer domain instruction.\r\n */\r\nexport const transferDomain = async ({\r\n rpc,\r\n domain,\r\n newOwner,\r\n classAddress,\r\n parentAddress,\r\n parentOwner,\r\n}: TransferDomainParams): Promise<Instruction> => {\r\n const domainAddress = await deriveAddress(\r\n domain,\r\n parentAddress,\r\n classAddress\r\n );\r\n\r\n const currentOwner =\r\n classAddress || (await RegistryState.retrieve(rpc, domainAddress)).owner;\r\n\r\n const transferInstr = new TransferInstruction({ newOwner }).getInstruction(\r\n NAME_PROGRAM_ADDRESS,\r\n domainAddress,\r\n currentOwner,\r\n classAddress,\r\n parentAddress,\r\n parentOwner\r\n );\r\n\r\n return transferInstr;\r\n};\r\n"],"names":["transferDomain","async","rpc","domain","newOwner","classAddress","parentAddress","parentOwner","domainAddress","deriveAddress","currentOwner","RegistryState","retrieve","owner","TransferInstruction","getInstruction","NAME_PROGRAM_ADDRESS"],"mappings":"wQA4BaA,EAAiBC,OAC5BC,MACAC,SACAC,WACAC,eACAC,gBACAC,kBAEA,MAAMC,QAAsBC,EAC1BN,EACAG,EACAD,GAGIK,EACJL,UAAuBM,EAAcC,SAASV,EAAKM,IAAgBK,MAWrE,OATsB,IAAIC,EAAoB,CAAEV,aAAYW,eAC1DC,EACAR,EACAE,EACAL,EACAC,EACAC,EAGkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"transferSubdomain.mjs","sources":["../../../src/bindings/transferSubdomain.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, IInstruction, Rpc } from \"@solana/kit\";\r\n\r\nimport { NAME_PROGRAM_ADDRESS } from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidSubdomainError } from \"../errors\";\r\nimport { TransferInstruction } from \"../instructions/transferInstruction\";\r\nimport { RegistryState } from \"../states/registry\";\r\n\r\ninterface TransferSubdomainParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n subdomain: string;\r\n newOwner: Address;\r\n isParentOwnerSigner?: boolean;\r\n currentOwner?: Address;\r\n}\r\n\r\n/**\r\n * Transfers a subdomain to a new owner.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `subdomain`: The subdomain to transfer. This can include or omit the .sol suffix\r\n * (e.g., 'something.sns.sol' or 'something.sns').\r\n * - `newOwner`: The address of the new owner.\r\n * - `isParentOwnerSigner`: (Optional) Specifies if the parent domain owner is a signer\r\n * for this transaction.\r\n * - `currentOwner`: (Optional) The current owner of the subdomain. If not provided, it\r\n * will be resolved automatically. This is useful for building transactions when the subdomain\r\n * does not yet exist.\r\n * @returns A promise that resolves to the transfer subdomain instruction.\r\n */\r\nexport const transferSubdomain = async ({\r\n rpc,\r\n subdomain,\r\n newOwner,\r\n isParentOwnerSigner,\r\n currentOwner,\r\n}: TransferSubdomainParams): Promise<IInstruction> => {\r\n const {\r\n domainAddress,\r\n isSub,\r\n parentAddress: _parentAddress,\r\n } = await getDomainAddress({ domain: subdomain });\r\n\r\n if (!isSub || !_parentAddress) {\r\n throw new InvalidSubdomainError(\"The subdomain is not valid\");\r\n }\r\n\r\n if (!currentOwner) {\r\n const registry = await RegistryState.retrieve(rpc, domainAddress);\r\n currentOwner = registry.owner;\r\n }\r\n\r\n let parentAddress: Address | undefined = undefined;\r\n let parentOwner: Address | undefined = undefined;\r\n\r\n if (isParentOwnerSigner) {\r\n parentAddress = _parentAddress;\r\n parentOwner = (await RegistryState.retrieve(rpc, _parentAddress)).owner;\r\n }\r\n\r\n const ix = new TransferInstruction({ newOwner }).getInstruction(\r\n NAME_PROGRAM_ADDRESS,\r\n domainAddress,\r\n currentOwner,\r\n undefined,\r\n parentAddress,\r\n parentOwner\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["transferSubdomain","async","rpc","subdomain","newOwner","isParentOwnerSigner","currentOwner","domainAddress","isSub","parentAddress","_parentAddress","getDomainAddress","domain","InvalidSubdomainError","RegistryState","retrieve","owner","parentOwner","TransferInstruction","getInstruction","NAME_PROGRAM_ADDRESS","undefined"],"mappings":"+TA+Ba,MAAAA,EAAoBC,OAC/BC,MACAC,YACAC,WACAC,sBACAC,mBAEA,MAAMC,cACJA,EAAaC,MACbA,EACAC,cAAeC,SACPC,EAAiB,CAAEC,OAAQT,IAErC,IAAKK,IAAUE,EACb,MAAM,IAAIG,EAAsB,8BAGlC,IAAKP,EAAc,CAEjBA,SADuBQ,EAAcC,SAASb,EAAKK,IAC3BS,MAG1B,IAAIP,EACAQ,EAEAZ,IACFI,EAAgBC,EAChBO,SAAqBH,EAAcC,SAASb,EAAKQ,IAAiBM,OAYpE,OATW,IAAIE,EAAoB,CAAEd,aAAYe,eAC/CC,EACAb,EACAD,OACAe,EACAZ,EACAQ,EAGO"}
1
+ {"version":3,"file":"transferSubdomain.mjs","sources":["../../../src/bindings/transferSubdomain.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, Instruction, Rpc } from \"@solana/kit\";\r\n\r\nimport { NAME_PROGRAM_ADDRESS } from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidSubdomainError } from \"../errors\";\r\nimport { TransferInstruction } from \"../instructions/transferInstruction\";\r\nimport { RegistryState } from \"../states/registry\";\r\n\r\ninterface TransferSubdomainParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n subdomain: string;\r\n newOwner: Address;\r\n isParentOwnerSigner?: boolean;\r\n currentOwner?: Address;\r\n}\r\n\r\n/**\r\n * Transfers a subdomain to a new owner.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `subdomain`: The subdomain to transfer. This can include or omit the .sol suffix\r\n * (e.g., 'something.sns.sol' or 'something.sns').\r\n * - `newOwner`: The address of the new owner.\r\n * - `isParentOwnerSigner`: (Optional) Specifies if the parent domain owner is a signer\r\n * for this transaction.\r\n * - `currentOwner`: (Optional) The current owner of the subdomain. If not provided, it\r\n * will be resolved automatically. This is useful for building transactions when the subdomain\r\n * does not yet exist.\r\n * @returns A promise that resolves to the transfer subdomain instruction.\r\n */\r\nexport const transferSubdomain = async ({\r\n rpc,\r\n subdomain,\r\n newOwner,\r\n isParentOwnerSigner,\r\n currentOwner,\r\n}: TransferSubdomainParams): Promise<Instruction> => {\r\n const {\r\n domainAddress,\r\n isSub,\r\n parentAddress: _parentAddress,\r\n } = await getDomainAddress({ domain: subdomain });\r\n\r\n if (!isSub || !_parentAddress) {\r\n throw new InvalidSubdomainError(\"The subdomain is not valid\");\r\n }\r\n\r\n if (!currentOwner) {\r\n const registry = await RegistryState.retrieve(rpc, domainAddress);\r\n currentOwner = registry.owner;\r\n }\r\n\r\n let parentAddress: Address | undefined = undefined;\r\n let parentOwner: Address | undefined = undefined;\r\n\r\n if (isParentOwnerSigner) {\r\n parentAddress = _parentAddress;\r\n parentOwner = (await RegistryState.retrieve(rpc, _parentAddress)).owner;\r\n }\r\n\r\n const ix = new TransferInstruction({ newOwner }).getInstruction(\r\n NAME_PROGRAM_ADDRESS,\r\n domainAddress,\r\n currentOwner,\r\n undefined,\r\n parentAddress,\r\n parentOwner\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["transferSubdomain","async","rpc","subdomain","newOwner","isParentOwnerSigner","currentOwner","domainAddress","isSub","parentAddress","_parentAddress","getDomainAddress","domain","InvalidSubdomainError","RegistryState","retrieve","owner","parentOwner","TransferInstruction","getInstruction","NAME_PROGRAM_ADDRESS","undefined"],"mappings":"+TA+Ba,MAAAA,EAAoBC,OAC/BC,MACAC,YACAC,WACAC,sBACAC,mBAEA,MAAMC,cACJA,EAAaC,MACbA,EACAC,cAAeC,SACPC,EAAiB,CAAEC,OAAQT,IAErC,IAAKK,IAAUE,EACb,MAAM,IAAIG,EAAsB,8BAGlC,IAAKP,EAAc,CAEjBA,SADuBQ,EAAcC,SAASb,EAAKK,IAC3BS,MAG1B,IAAIP,EACAQ,EAEAZ,IACFI,EAAgBC,EAChBO,SAAqBH,EAAcC,SAASb,EAAKQ,IAAiBM,OAYpE,OATW,IAAIE,EAAoB,CAAEd,aAAYe,eAC/CC,EACAb,EACAD,OACAe,EACAZ,EACAQ,EAGO"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateNameRegistry.mjs","sources":["../../../src/bindings/updateNameRegistry.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, IInstruction, Rpc } from \"@solana/kit\";\r\n\r\nimport { NAME_PROGRAM_ADDRESS } from \"../constants/addresses\";\r\nimport { UpdateNameRegistryInstruction } from \"../instructions/updateNameRegistryInstruction\";\r\nimport { RegistryState } from \"../states/registry\";\r\nimport { deriveAddress } from \"../utils/deriveAddress\";\r\n\r\nexport interface UpdateNameRegistryParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n domain: string;\r\n offset: number;\r\n data: Uint8Array;\r\n classAddress?: Address;\r\n parentAddress?: Address;\r\n}\r\n\r\n/**\r\n * Update the data of the given name registry.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `domain`: The name of the domain whose registry will be updated.\r\n * - `offset`: The offset in bytes where the update should begin.\r\n * - `data`: The data to be written to the registry.\r\n * - `classAddress`: (Optional) The address of the class associated with the registry.\r\n * - `parentAddress`: (Optional) The address of the parent registry.\r\n * @returns A promise that resolves to the update name registry instruction.\r\n */\r\nexport async function updateNameRegistry({\r\n rpc,\r\n domain,\r\n offset,\r\n data,\r\n classAddress,\r\n parentAddress,\r\n}: UpdateNameRegistryParams): Promise<IInstruction> {\r\n const domainAddress = await deriveAddress(\r\n domain,\r\n parentAddress,\r\n classAddress\r\n );\r\n\r\n const signer =\r\n classAddress || (await RegistryState.retrieve(rpc, domainAddress)).owner;\r\n\r\n const ix = new UpdateNameRegistryInstruction({\r\n offset,\r\n inputDat: data,\r\n }).getInstruction(NAME_PROGRAM_ADDRESS, domainAddress, signer);\r\n\r\n return ix;\r\n}\r\n"],"names":["async","updateNameRegistry","rpc","domain","offset","data","classAddress","parentAddress","domainAddress","deriveAddress","signer","RegistryState","retrieve","owner","UpdateNameRegistryInstruction","inputDat","getInstruction","NAME_PROGRAM_ADDRESS"],"mappings":"sRA4BOA,eAAeC,GAAmBC,IACvCA,EAAGC,OACHA,EAAMC,OACNA,EAAMC,KACNA,EAAIC,aACJA,EAAYC,cACZA,IAEA,MAAMC,QAAsBC,EAC1BN,EACAI,EACAD,GAGII,EACJJ,UAAuBK,EAAcC,SAASV,EAAKM,IAAgBK,MAOrE,OALW,IAAIC,EAA8B,CAC3CV,SACAW,SAAUV,IACTW,eAAeC,EAAsBT,EAAeE,EAGzD"}
1
+ {"version":3,"file":"updateNameRegistry.mjs","sources":["../../../src/bindings/updateNameRegistry.ts"],"sourcesContent":["import { Address, GetAccountInfoApi, Instruction, Rpc } from \"@solana/kit\";\r\n\r\nimport { NAME_PROGRAM_ADDRESS } from \"../constants/addresses\";\r\nimport { UpdateNameRegistryInstruction } from \"../instructions/updateNameRegistryInstruction\";\r\nimport { RegistryState } from \"../states/registry\";\r\nimport { deriveAddress } from \"../utils/deriveAddress\";\r\n\r\nexport interface UpdateNameRegistryParams {\r\n rpc: Rpc<GetAccountInfoApi>;\r\n domain: string;\r\n offset: number;\r\n data: Uint8Array;\r\n classAddress?: Address;\r\n parentAddress?: Address;\r\n}\r\n\r\n/**\r\n * Update the data of the given name registry.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetAccountInfoApi.\r\n * - `domain`: The name of the domain whose registry will be updated.\r\n * - `offset`: The offset in bytes where the update should begin.\r\n * - `data`: The data to be written to the registry.\r\n * - `classAddress`: (Optional) The address of the class associated with the registry.\r\n * - `parentAddress`: (Optional) The address of the parent registry.\r\n * @returns A promise that resolves to the update name registry instruction.\r\n */\r\nexport async function updateNameRegistry({\r\n rpc,\r\n domain,\r\n offset,\r\n data,\r\n classAddress,\r\n parentAddress,\r\n}: UpdateNameRegistryParams): Promise<Instruction> {\r\n const domainAddress = await deriveAddress(\r\n domain,\r\n parentAddress,\r\n classAddress\r\n );\r\n\r\n const signer =\r\n classAddress || (await RegistryState.retrieve(rpc, domainAddress)).owner;\r\n\r\n const ix = new UpdateNameRegistryInstruction({\r\n offset,\r\n inputDat: data,\r\n }).getInstruction(NAME_PROGRAM_ADDRESS, domainAddress, signer);\r\n\r\n return ix;\r\n}\r\n"],"names":["async","updateNameRegistry","rpc","domain","offset","data","classAddress","parentAddress","domainAddress","deriveAddress","signer","RegistryState","retrieve","owner","UpdateNameRegistryInstruction","inputDat","getInstruction","NAME_PROGRAM_ADDRESS"],"mappings":"sRA4BOA,eAAeC,GAAmBC,IACvCA,EAAGC,OACHA,EAAMC,OACNA,EAAMC,KACNA,EAAIC,aACJA,EAAYC,cACZA,IAEA,MAAMC,QAAsBC,EAC1BN,EACAI,EACAD,GAGII,EACJJ,UAAuBK,EAAcC,SAASV,EAAKM,IAAgBK,MAOrE,OALW,IAAIC,EAA8B,CAC3CV,SACAW,SAAUV,IACTW,eAAeC,EAAsBT,EAAeE,EAGzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateRecord.mjs","sources":["../../../src/bindings/updateRecord.ts"],"sourcesContent":["import { Address, IInstruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { updateRecordInstruction } from \"../instructions/updateRecordInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\nimport { serializeRecordContent } from \"../utils/serializers/serializeRecordContent\";\r\n\r\ninterface UpdateRecordParams {\r\n domain: string;\r\n record: Record;\r\n content: string;\r\n owner: Address;\r\n payer: Address;\r\n}\r\n\r\n/**\r\n * Updates an existing record under the specified domain.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `domain`: The domain under which the record resides.\r\n * - `record`: An enumeration representing the type of record to be updated.\r\n * - `content`: The updated content to be associated with the record.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the record update.\r\n * @returns A promise that resolves to the update record instruction.\r\n */\r\nexport const updateRecord = async ({\r\n domain,\r\n record,\r\n content,\r\n owner,\r\n payer,\r\n}: UpdateRecordParams): Promise<IInstruction> => {\r\n let { domainAddress, isSub, parentAddress } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new updateRecordInstruction({\r\n record: `\\x02${record}`,\r\n content: serializeRecordContent({ content, record }),\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["updateRecord","async","domain","record","content","owner","payer","domainAddress","isSub","parentAddress","getDomainAddress","RecordVersion","V2","InvalidParentError","updateRecordInstruction","serializeRecordContent","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"qfAiCa,MAAAA,EAAeC,OAC1BC,SACAC,SACAC,UACAC,QACAC,YAEA,IAAIC,cAAEA,EAAaC,MAAEA,EAAKC,cAAEA,SAAwBC,EAAiB,CACnER,OAAQ,GAAGC,KAAUD,IACrBC,OAAQQ,EAAcC,KAOxB,GAJIJ,IACFC,SAAuBC,EAAiB,CAAER,YAAWK,gBAGlDE,EACH,MAAM,IAAII,EAAmB,6BAiB/B,OAdW,IAAIC,EAAwB,CACrCX,OAAQ,IAAOA,IACfC,QAASW,EAAuB,CAAEX,UAASD,aAC1Ca,eACDC,EACAC,EACAC,EACAb,EACAC,EACAE,EACAJ,EACAe,EAGO"}
1
+ {"version":3,"file":"updateRecord.mjs","sources":["../../../src/bindings/updateRecord.ts"],"sourcesContent":["import { Address, Instruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { updateRecordInstruction } from \"../instructions/updateRecordInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\nimport { serializeRecordContent } from \"../utils/serializers/serializeRecordContent\";\r\n\r\ninterface UpdateRecordParams {\r\n domain: string;\r\n record: Record;\r\n content: string;\r\n owner: Address;\r\n payer: Address;\r\n}\r\n\r\n/**\r\n * Updates an existing record under the specified domain.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `domain`: The domain under which the record resides.\r\n * - `record`: An enumeration representing the type of record to be updated.\r\n * - `content`: The updated content to be associated with the record.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the record update.\r\n * @returns A promise that resolves to the update record instruction.\r\n */\r\nexport const updateRecord = async ({\r\n domain,\r\n record,\r\n content,\r\n owner,\r\n payer,\r\n}: UpdateRecordParams): Promise<Instruction> => {\r\n let { domainAddress, isSub, parentAddress } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new updateRecordInstruction({\r\n record: `\\x02${record}`,\r\n content: serializeRecordContent({ content, record }),\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["updateRecord","async","domain","record","content","owner","payer","domainAddress","isSub","parentAddress","getDomainAddress","RecordVersion","V2","InvalidParentError","updateRecordInstruction","serializeRecordContent","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"qfAiCa,MAAAA,EAAeC,OAC1BC,SACAC,SACAC,UACAC,QACAC,YAEA,IAAIC,cAAEA,EAAaC,MAAEA,EAAKC,cAAEA,SAAwBC,EAAiB,CACnER,OAAQ,GAAGC,KAAUD,IACrBC,OAAQQ,EAAcC,KAOxB,GAJIJ,IACFC,SAAuBC,EAAiB,CAAER,YAAWK,gBAGlDE,EACH,MAAM,IAAII,EAAmB,6BAiB/B,OAdW,IAAIC,EAAwB,CACrCX,OAAQ,IAAOA,IACfC,QAASW,EAAuB,CAAEX,UAASD,aAC1Ca,eACDC,EACAC,EACAC,EACAb,EACAC,EACAE,EACAJ,EACAe,EAGO"}
@@ -1 +1 @@
1
- {"version":3,"file":"validateRoa.mjs","sources":["../../../src/bindings/validateRoa.ts"],"sourcesContent":["import { Address, IInstruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { validateRoaInstruction } from \"../instructions/validateRoaInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\n\r\ninterface ValidateRoaParams {\r\n staleness: boolean;\r\n domain: string;\r\n record: Record;\r\n owner: Address;\r\n payer: Address;\r\n verifier: Address;\r\n}\r\n\r\n/**\r\n * Validates the right of association of a record.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `staleness`: Indicates whether the record validation is stale.\r\n * - `domain`: The domain under which the record resides.\r\n * - `record`: An enumeration representing the type of record to validate.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the validation process.\r\n * - `verifier`: The address responsible for verifying the record.\r\n * @returns A promise that resolves to the validate ROA instruction.\r\n */\r\nexport const validateRoa = async ({\r\n staleness,\r\n domain,\r\n record,\r\n owner,\r\n payer,\r\n verifier,\r\n}: ValidateRoaParams): Promise<IInstruction> => {\r\n let { domainAddress, isSub, parentAddress } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new validateRoaInstruction({\r\n staleness,\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n verifier\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["validateRoa","async","staleness","domain","record","owner","payer","verifier","domainAddress","isSub","parentAddress","getDomainAddress","RecordVersion","V2","InvalidParentError","validateRoaInstruction","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"gaAkCaA,EAAcC,OACzBC,YACAC,SACAC,SACAC,QACAC,QACAC,eAEA,IAAIC,cAAEA,EAAaC,MAAEA,EAAKC,cAAEA,SAAwBC,EAAiB,CACnER,OAAQ,GAAGC,KAAUD,IACrBC,OAAQQ,EAAcC,KAOxB,GAJIJ,IACFC,SAAuBC,EAAiB,CAAER,YAAWK,gBAGlDE,EACH,MAAM,IAAII,EAAmB,6BAiB/B,OAdW,IAAIC,EAAuB,CACpCb,cACCc,eACDC,EACAC,EACAC,EACAb,EACAE,EACAE,EACAL,EACAe,EACAb,EAGO"}
1
+ {"version":3,"file":"validateRoa.mjs","sources":["../../../src/bindings/validateRoa.ts"],"sourcesContent":["import { Address, Instruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { validateRoaInstruction } from \"../instructions/validateRoaInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\n\r\ninterface ValidateRoaParams {\r\n staleness: boolean;\r\n domain: string;\r\n record: Record;\r\n owner: Address;\r\n payer: Address;\r\n verifier: Address;\r\n}\r\n\r\n/**\r\n * Validates the right of association of a record.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `staleness`: Indicates whether the record validation is stale.\r\n * - `domain`: The domain under which the record resides.\r\n * - `record`: An enumeration representing the type of record to validate.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the validation process.\r\n * - `verifier`: The address responsible for verifying the record.\r\n * @returns A promise that resolves to the validate ROA instruction.\r\n */\r\nexport const validateRoa = async ({\r\n staleness,\r\n domain,\r\n record,\r\n owner,\r\n payer,\r\n verifier,\r\n}: ValidateRoaParams): Promise<Instruction> => {\r\n let { domainAddress, isSub, parentAddress } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new validateRoaInstruction({\r\n staleness,\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n verifier\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["validateRoa","async","staleness","domain","record","owner","payer","verifier","domainAddress","isSub","parentAddress","getDomainAddress","RecordVersion","V2","InvalidParentError","validateRoaInstruction","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"gaAkCaA,EAAcC,OACzBC,YACAC,SACAC,SACAC,QACAC,QACAC,eAEA,IAAIC,cAAEA,EAAaC,MAAEA,EAAKC,cAAEA,SAAwBC,EAAiB,CACnER,OAAQ,GAAGC,KAAUD,IACrBC,OAAQQ,EAAcC,KAOxB,GAJIJ,IACFC,SAAuBC,EAAiB,CAAER,YAAWK,gBAGlDE,EACH,MAAM,IAAII,EAAmB,6BAiB/B,OAdW,IAAIC,EAAuB,CACpCb,cACCc,eACDC,EACAC,EACAC,EACAb,EACAE,EACAE,EACAL,EACAe,EACAb,EAGO"}
@@ -1 +1 @@
1
- {"version":3,"file":"validateRoaEthereum.mjs","sources":["../../../src/bindings/validateRoaEthereum.ts"],"sourcesContent":["import { Address, IInstruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { validateRoaEthereumInstruction } from \"../instructions/validateRoaEthereumInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\nimport { Validation } from \"../types/validation\";\r\n\r\ninterface ValidateRoaEthereumParams {\r\n domain: string;\r\n record: Record;\r\n owner: Address;\r\n payer: Address;\r\n signature: Uint8Array;\r\n expectedPubkey: Uint8Array;\r\n}\r\n\r\n/**\r\n * Validates the right of association of a record using an Ethereum signature.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `domain`: The domain under which the record resides.\r\n * - `record`: An enumeration representing the type of record to validate.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the validation process.\r\n * - `signature`: The signature used for validation.\r\n * - `expectedPubkey`: The expected public key associated with the validation.\r\n * @returns A promise that resolves to the validate ROA Ethereum instruction.\r\n */\r\nexport const validateRoaEthereum = async ({\r\n domain,\r\n record,\r\n owner,\r\n payer,\r\n signature,\r\n expectedPubkey,\r\n}: ValidateRoaEthereumParams): Promise<IInstruction> => {\r\n let { domainAddress, parentAddress, isSub } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new validateRoaEthereumInstruction({\r\n validation: Validation.Ethereum,\r\n signature,\r\n expectedPubkey,\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["validateRoaEthereum","async","domain","record","owner","payer","signature","expectedPubkey","domainAddress","parentAddress","isSub","getDomainAddress","RecordVersion","V2","InvalidParentError","validateRoaEthereumInstruction","validation","Validation","Ethereum","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"qeAmCaA,EAAsBC,OACjCC,SACAC,SACAC,QACAC,QACAC,YACAC,qBAEA,IAAIC,cAAEA,EAAaC,cAAEA,EAAaC,MAAEA,SAAgBC,EAAiB,CACnET,OAAQ,GAAGC,KAAUD,IACrBC,OAAQS,EAAcC,KAOxB,GAJIH,IACFD,SAAuBE,EAAiB,CAAET,YAAWM,gBAGlDC,EACH,MAAM,IAAIK,EAAmB,6BAkB/B,OAfW,IAAIC,EAA+B,CAC5CC,WAAYC,EAAWC,SACvBZ,YACAC,mBACCY,eACDC,EACAC,EACAC,EACAjB,EACAG,EACAC,EACAL,EACAmB,EAGO"}
1
+ {"version":3,"file":"validateRoaEthereum.mjs","sources":["../../../src/bindings/validateRoaEthereum.ts"],"sourcesContent":["import { Address, Instruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { validateRoaEthereumInstruction } from \"../instructions/validateRoaEthereumInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\nimport { Validation } from \"../types/validation\";\r\n\r\ninterface ValidateRoaEthereumParams {\r\n domain: string;\r\n record: Record;\r\n owner: Address;\r\n payer: Address;\r\n signature: Uint8Array;\r\n expectedPubkey: Uint8Array;\r\n}\r\n\r\n/**\r\n * Validates the right of association of a record using an Ethereum signature.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `domain`: The domain under which the record resides.\r\n * - `record`: An enumeration representing the type of record to validate.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the validation process.\r\n * - `signature`: The signature used for validation.\r\n * - `expectedPubkey`: The expected public key associated with the validation.\r\n * @returns A promise that resolves to the validate ROA Ethereum instruction.\r\n */\r\nexport const validateRoaEthereum = async ({\r\n domain,\r\n record,\r\n owner,\r\n payer,\r\n signature,\r\n expectedPubkey,\r\n}: ValidateRoaEthereumParams): Promise<Instruction> => {\r\n let { domainAddress, parentAddress, isSub } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new validateRoaEthereumInstruction({\r\n validation: Validation.Ethereum,\r\n signature,\r\n expectedPubkey,\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["validateRoaEthereum","async","domain","record","owner","payer","signature","expectedPubkey","domainAddress","parentAddress","isSub","getDomainAddress","RecordVersion","V2","InvalidParentError","validateRoaEthereumInstruction","validation","Validation","Ethereum","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"qeAmCaA,EAAsBC,OACjCC,SACAC,SACAC,QACAC,QACAC,YACAC,qBAEA,IAAIC,cAAEA,EAAaC,cAAEA,EAAaC,MAAEA,SAAgBC,EAAiB,CACnET,OAAQ,GAAGC,KAAUD,IACrBC,OAAQS,EAAcC,KAOxB,GAJIH,IACFD,SAAuBE,EAAiB,CAAET,YAAWM,gBAGlDC,EACH,MAAM,IAAIK,EAAmB,6BAkB/B,OAfW,IAAIC,EAA+B,CAC5CC,WAAYC,EAAWC,SACvBZ,YACAC,mBACCY,eACDC,EACAC,EACAC,EACAjB,EACAG,EACAC,EACAL,EACAmB,EAGO"}
@@ -1 +1 @@
1
- {"version":3,"file":"writeRoa.mjs","sources":["../../../src/bindings/writeRoa.ts"],"sourcesContent":["import { Address, IInstruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { writeRoaInstruction } from \"../instructions/writeRoaInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\n\r\ninterface WriteRoaParams {\r\n domain: string;\r\n record: Record;\r\n owner: Address;\r\n payer: Address;\r\n roaId: Address;\r\n}\r\n\r\n/**\r\n * Writes a ROA (Right of association) in a record.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `domain`: The domain under which the record will be written.\r\n * - `record`: An enumeration representing the type of record to be written.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the operation.\r\n * - `roaId`: The identifier for the ROA.\r\n * @returns A promise that resolves to the write ROA instruction.\r\n */\r\nexport const writeRoa = async ({\r\n domain,\r\n record,\r\n owner,\r\n payer,\r\n roaId,\r\n}: WriteRoaParams): Promise<IInstruction> => {\r\n let { domainAddress, isSub, parentAddress } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new writeRoaInstruction({\r\n roaId,\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["writeRoa","async","domain","record","owner","payer","roaId","domainAddress","isSub","parentAddress","getDomainAddress","RecordVersion","V2","InvalidParentError","writeRoaInstruction","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"oZAgCa,MAAAA,EAAWC,OACtBC,SACAC,SACAC,QACAC,QACAC,YAEA,IAAIC,cAAEA,EAAaC,MAAEA,EAAKC,cAAEA,SAAwBC,EAAiB,CACnER,OAAQ,GAAGC,KAAUD,IACrBC,OAAQQ,EAAcC,KAOxB,GAJIJ,IACFC,SAAuBC,EAAiB,CAAER,YAAWK,gBAGlDE,EACH,MAAM,IAAII,EAAmB,6BAgB/B,OAbW,IAAIC,EAAoB,CACjCR,UACCS,eACDC,EACAC,EACAC,EACAb,EACAE,EACAE,EACAL,EACAe,EAGO"}
1
+ {"version":3,"file":"writeRoa.mjs","sources":["../../../src/bindings/writeRoa.ts"],"sourcesContent":["import { Address, Instruction } from \"@solana/kit\";\r\n\r\nimport {\r\n CENTRAL_STATE_DOMAIN_RECORDS,\r\n NAME_PROGRAM_ADDRESS,\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport { getDomainAddress } from \"../domain/getDomainAddress\";\r\nimport { InvalidParentError } from \"../errors\";\r\nimport { writeRoaInstruction } from \"../instructions/writeRoaInstruction\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\n\r\ninterface WriteRoaParams {\r\n domain: string;\r\n record: Record;\r\n owner: Address;\r\n payer: Address;\r\n roaId: Address;\r\n}\r\n\r\n/**\r\n * Writes a ROA (Right of association) in a record.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `domain`: The domain under which the record will be written.\r\n * - `record`: An enumeration representing the type of record to be written.\r\n * - `owner`: The address of the domain's owner.\r\n * - `payer`: The address funding the operation.\r\n * - `roaId`: The identifier for the ROA.\r\n * @returns A promise that resolves to the write ROA instruction.\r\n */\r\nexport const writeRoa = async ({\r\n domain,\r\n record,\r\n owner,\r\n payer,\r\n roaId,\r\n}: WriteRoaParams): Promise<Instruction> => {\r\n let { domainAddress, isSub, parentAddress } = await getDomainAddress({\r\n domain: `${record}.${domain}`,\r\n record: RecordVersion.V2,\r\n });\r\n\r\n if (isSub) {\r\n parentAddress = (await getDomainAddress({ domain })).domainAddress;\r\n }\r\n\r\n if (!parentAddress) {\r\n throw new InvalidParentError(\"Parent could not be found\");\r\n }\r\n\r\n const ix = new writeRoaInstruction({\r\n roaId,\r\n }).getInstruction(\r\n RECORDS_PROGRAM_ADDRESS,\r\n SYSTEM_PROGRAM_ADDRESS,\r\n NAME_PROGRAM_ADDRESS,\r\n payer,\r\n domainAddress,\r\n parentAddress,\r\n owner,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n\r\n return ix;\r\n};\r\n"],"names":["writeRoa","async","domain","record","owner","payer","roaId","domainAddress","isSub","parentAddress","getDomainAddress","RecordVersion","V2","InvalidParentError","writeRoaInstruction","getInstruction","RECORDS_PROGRAM_ADDRESS","SYSTEM_PROGRAM_ADDRESS","NAME_PROGRAM_ADDRESS","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":"oZAgCa,MAAAA,EAAWC,OACtBC,SACAC,SACAC,QACAC,QACAC,YAEA,IAAIC,cAAEA,EAAaC,MAAEA,EAAKC,cAAEA,SAAwBC,EAAiB,CACnER,OAAQ,GAAGC,KAAUD,IACrBC,OAAQQ,EAAcC,KAOxB,GAJIJ,IACFC,SAAuBC,EAAiB,CAAER,YAAWK,gBAGlDE,EACH,MAAM,IAAII,EAAmB,6BAgB/B,OAbW,IAAIC,EAAoB,CACjCR,UACCS,eACDC,EACAC,EACAC,EACAb,EACAE,EACAE,EACAL,EACAe,EAGO"}
@@ -1 +1 @@
1
- {"version":3,"file":"getAllDomains.mjs","sources":["../../../src/domain/getAllDomains.ts"],"sourcesContent":["import { GetProgramAccountsApi, Rpc } from \"@solana/kit\";\r\n\r\nimport { addressCodec, base64Codec } from \"../codecs\";\r\nimport {\r\n NAME_PROGRAM_ADDRESS,\r\n ROOT_DOMAIN_ADDRESS,\r\n} from \"../constants/addresses\";\r\n\r\ninterface GetAllDomainsParams {\r\n rpc: Rpc<GetProgramAccountsApi>;\r\n}\r\n\r\n/**\r\n * Retrieves the addresses of all .sol domains.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetProgramAccountsApi.\r\n * @returns A promise that resolves to an array of objects representing domain addresses and owners.\r\n */\r\nexport const getAllDomains = async ({ rpc }: GetAllDomainsParams) => {\r\n const accounts = await rpc\r\n .getProgramAccounts(NAME_PROGRAM_ADDRESS, {\r\n encoding: \"base64\",\r\n filters: [\r\n {\r\n memcmp: {\r\n offset: 0n,\r\n bytes: ROOT_DOMAIN_ADDRESS,\r\n encoding: \"base58\",\r\n },\r\n },\r\n ],\r\n dataSlice: { offset: 32, length: 32 },\r\n })\r\n .send();\r\n\r\n return accounts.map(({ account: { data }, pubkey }) => ({\r\n domainAddress: pubkey,\r\n owner: addressCodec.decode(base64Codec.encode(data[0])),\r\n }));\r\n};\r\n"],"names":["getAllDomains","async","rpc","getProgramAccounts","NAME_PROGRAM_ADDRESS","encoding","filters","memcmp","offset","bytes","ROOT_DOMAIN_ADDRESS","dataSlice","length","send","map","account","data","pubkey","domainAddress","owner","addressCodec","decode","base64Codec","encode"],"mappings":"yJAmBa,MAAAA,EAAgBC,OAASC,gBACbA,EACpBC,mBAAmBC,EAAsB,CACxCC,SAAU,SACVC,QAAS,CACP,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOC,EACPL,SAAU,YAIhBM,UAAW,CAAEH,OAAQ,GAAII,OAAQ,MAElCC,QAEaC,KAAI,EAAGC,SAAWC,QAAQC,aAAc,CACtDC,cAAeD,EACfE,MAAOC,EAAaC,OAAOC,EAAYC,OAAOP,EAAK"}
1
+ {"version":3,"file":"getAllDomains.mjs","sources":["../../../src/domain/getAllDomains.ts"],"sourcesContent":["import { Base58EncodedBytes, GetProgramAccountsApi, Rpc } from \"@solana/kit\";\r\n\r\nimport { addressCodec, base64Codec } from \"../codecs\";\r\nimport {\r\n NAME_PROGRAM_ADDRESS,\r\n ROOT_DOMAIN_ADDRESS,\r\n} from \"../constants/addresses\";\r\n\r\ninterface GetAllDomainsParams {\r\n rpc: Rpc<GetProgramAccountsApi>;\r\n}\r\n\r\n/**\r\n * Retrieves the addresses of all .sol domains.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetProgramAccountsApi.\r\n * @returns A promise that resolves to an array of objects representing domain addresses and owners.\r\n */\r\nexport const getAllDomains = async ({ rpc }: GetAllDomainsParams) => {\r\n const accounts = await rpc\r\n .getProgramAccounts(NAME_PROGRAM_ADDRESS, {\r\n encoding: \"base64\",\r\n filters: [\r\n {\r\n memcmp: {\r\n offset: 0n,\r\n bytes: ROOT_DOMAIN_ADDRESS as string as Base58EncodedBytes,\r\n encoding: \"base58\",\r\n },\r\n },\r\n ],\r\n dataSlice: { offset: 32, length: 32 },\r\n })\r\n .send();\r\n\r\n return accounts.map(({ account: { data }, pubkey }) => ({\r\n domainAddress: pubkey,\r\n owner: addressCodec.decode(base64Codec.encode(data[0])),\r\n }));\r\n};\r\n"],"names":["getAllDomains","async","rpc","getProgramAccounts","NAME_PROGRAM_ADDRESS","encoding","filters","memcmp","offset","bytes","ROOT_DOMAIN_ADDRESS","dataSlice","length","send","map","account","data","pubkey","domainAddress","owner","addressCodec","decode","base64Codec","encode"],"mappings":"yJAmBa,MAAAA,EAAgBC,OAASC,gBACbA,EACpBC,mBAAmBC,EAAsB,CACxCC,SAAU,SACVC,QAAS,CACP,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOC,EACPL,SAAU,YAIhBM,UAAW,CAAEH,OAAQ,GAAII,OAAQ,MAElCC,QAEaC,KAAI,EAAGC,SAAWC,QAAQC,aAAc,CACtDC,cAAeD,EACfE,MAAOC,EAAaC,OAAOC,EAAYC,OAAOP,EAAK"}
@@ -1,2 +1,2 @@
1
- import{base64Codec as e,addressCodec as s}from"../codecs.mjs";import{NAME_PROGRAM_ADDRESS as t,REVERSE_LOOKUP_CLASS as o}from"../constants/addresses.mjs";import{deserializeReverse as r}from"../utils/deserializers/deserializeReverse.mjs";import{getReverseAddressFromDomainAddress as a}from"../utils/getReverseAddressFromDomainAddress.mjs";import{getDomainAddress as n}from"./getDomainAddress.mjs";const i=async({rpc:i,domain:d})=>{const{domainAddress:m,isSub:c}=await n({domain:d});if(c)return[];const f=i.getProgramAccounts(t,{encoding:"base64",filters:[{memcmp:{offset:0n,bytes:m,encoding:"base58"}},{memcmp:{offset:64n,bytes:o,encoding:"base58"}}]}).send(),l=await i.getProgramAccounts(t,{encoding:"base64",filters:[{memcmp:{offset:0n,bytes:m,encoding:"base58"}}],dataSlice:{offset:32,length:32}}).send(),[p,u]=await Promise.all([f,l]),g=new Map(p.map((s=>[s.pubkey,r({data:e.encode(s.account.data[0]).slice(96),trimFirstNullByte:!0})])));return(await Promise.all(u.map((t=>a({domainAddress:t.pubkey,parentAddress:m}).then((o=>{const r=g.get(o);return r?{subdomain:r,owner:s.decode(e.encode(t.account.data[0]))}:void 0})))))).filter((e=>void 0!==e))};export{i as getSubdomains};
1
+ import{base64Codec as e,addressCodec as s}from"../codecs.mjs";import{NAME_PROGRAM_ADDRESS as t,REVERSE_LOOKUP_CLASS as o}from"../constants/addresses.mjs";import{deserializeReverse as r}from"../utils/deserializers/deserializeReverse.mjs";import{getReverseAddressFromDomainAddress as n}from"../utils/getReverseAddressFromDomainAddress.mjs";import{getDomainAddress as a}from"./getDomainAddress.mjs";const d=async({rpc:d,domain:i})=>{const{domainAddress:m,isSub:c}=await a({domain:i});if(c)return[];const f=d.getProgramAccounts(t,{encoding:"base64",filters:[{memcmp:{offset:0n,bytes:m,encoding:"base58"}},{memcmp:{offset:64n,bytes:o,encoding:"base58"}}]}).send(),l=d.getProgramAccounts(t,{encoding:"base64",filters:[{memcmp:{offset:0n,bytes:m,encoding:"base58"}}],dataSlice:{offset:32,length:32}}).send(),[p,u]=await Promise.all([f,l]),g=new Map(p.map((s=>[s.pubkey,r({data:e.encode(s.account.data[0]).slice(96),trimFirstNullByte:!0})])));return(await Promise.all(u.map((t=>n({domainAddress:t.pubkey,parentAddress:m}).then((o=>{const r=g.get(o);return r?{subdomain:r,owner:s.decode(e.encode(t.account.data[0]))}:void 0})))))).filter((e=>void 0!==e))};export{d as getSubdomains};
2
2
  //# sourceMappingURL=getSubdomains.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSubdomains.mjs","sources":["../../../src/domain/getSubdomains.ts"],"sourcesContent":["import { Address, GetProgramAccountsApi, Rpc } from \"@solana/kit\";\r\n\r\nimport { addressCodec, base64Codec } from \"../codecs\";\r\nimport {\r\n NAME_PROGRAM_ADDRESS,\r\n REVERSE_LOOKUP_CLASS,\r\n} from \"../constants/addresses\";\r\nimport { deserializeReverse } from \"../utils/deserializers/deserializeReverse\";\r\nimport { getReverseAddressFromDomainAddress } from \"../utils/getReverseAddressFromDomainAddress\";\r\nimport { getDomainAddress } from \"./getDomainAddress\";\r\n\r\ninterface GetSubdomainsParams {\r\n rpc: Rpc<GetProgramAccountsApi>;\r\n domain: string;\r\n}\r\n\r\ninterface Result {\r\n subdomain: string;\r\n owner: Address;\r\n}\r\n\r\n/**\r\n * Retrieves all subdomains under the specified domain, including their owners.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetProgramAccountsApi.\r\n * - `domain`: The domain whose subdomains are to be retrieved.\r\n * @returns A promise that resolves to an array of subdomain objects, each containing the subdomain name and owner address.\r\n */\r\nexport const getSubdomains = async ({\r\n rpc,\r\n domain,\r\n}: GetSubdomainsParams): Promise<Result[]> => {\r\n const { domainAddress, isSub } = await getDomainAddress({ domain });\r\n\r\n if (isSub) return [];\r\n\r\n const getReversesAsync = rpc\r\n .getProgramAccounts(NAME_PROGRAM_ADDRESS, {\r\n encoding: \"base64\",\r\n filters: [\r\n {\r\n memcmp: {\r\n offset: 0n,\r\n bytes: domainAddress,\r\n encoding: \"base58\",\r\n },\r\n },\r\n {\r\n memcmp: {\r\n offset: 64n,\r\n bytes: REVERSE_LOOKUP_CLASS,\r\n encoding: \"base58\",\r\n },\r\n },\r\n ],\r\n })\r\n .send();\r\n\r\n const getSubsAsync = await rpc\r\n .getProgramAccounts(NAME_PROGRAM_ADDRESS, {\r\n encoding: \"base64\",\r\n filters: [\r\n {\r\n memcmp: {\r\n offset: 0n,\r\n bytes: domainAddress,\r\n encoding: \"base58\",\r\n },\r\n },\r\n ],\r\n dataSlice: { offset: 32, length: 32 },\r\n })\r\n .send();\r\n\r\n const [reverses, subs] = await Promise.all([getReversesAsync, getSubsAsync]);\r\n\r\n const map = new Map<string, string | undefined>(\r\n reverses.map((e) => [\r\n e.pubkey,\r\n deserializeReverse({\r\n data: base64Codec.encode(e.account.data[0]).slice(96),\r\n trimFirstNullByte: true,\r\n }),\r\n ])\r\n );\r\n\r\n const result = await Promise.all(\r\n subs.map((sub) =>\r\n getReverseAddressFromDomainAddress({\r\n domainAddress: sub.pubkey,\r\n parentAddress: domainAddress,\r\n }).then((revKey) => {\r\n const subdomain = map.get(revKey);\r\n return subdomain\r\n ? {\r\n subdomain,\r\n owner: addressCodec.decode(\r\n base64Codec.encode(sub.account.data[0])\r\n ),\r\n }\r\n : undefined;\r\n })\r\n )\r\n );\r\n\r\n const filteredResult = result.filter((sub) => sub !== undefined);\r\n\r\n return filteredResult;\r\n};\r\n"],"names":["getSubdomains","async","rpc","domain","domainAddress","isSub","getDomainAddress","getReversesAsync","getProgramAccounts","NAME_PROGRAM_ADDRESS","encoding","filters","memcmp","offset","bytes","REVERSE_LOOKUP_CLASS","send","getSubsAsync","dataSlice","length","reverses","subs","Promise","all","map","Map","e","pubkey","deserializeReverse","data","base64Codec","encode","account","slice","trimFirstNullByte","sub","getReverseAddressFromDomainAddress","parentAddress","then","revKey","subdomain","get","owner","addressCodec","decode","undefined","filter"],"mappings":"4YA6BO,MAAMA,EAAgBC,OAC3BC,MACAC,aAEA,MAAMC,cAAEA,EAAaC,MAAEA,SAAgBC,EAAiB,CAAEH,WAE1D,GAAIE,EAAO,MAAO,GAElB,MAAME,EAAmBL,EACtBM,mBAAmBC,EAAsB,CACxCC,SAAU,SACVC,QAAS,CACP,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOV,EACPM,SAAU,WAGd,CACEE,OAAQ,CACNC,OAAQ,IACRC,MAAOC,EACPL,SAAU,cAKjBM,OAEGC,QAAqBf,EACxBM,mBAAmBC,EAAsB,CACxCC,SAAU,SACVC,QAAS,CACP,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOV,EACPM,SAAU,YAIhBQ,UAAW,CAAEL,OAAQ,GAAIM,OAAQ,MAElCH,QAEII,EAAUC,SAAcC,QAAQC,IAAI,CAAChB,EAAkBU,IAExDO,EAAM,IAAIC,IACdL,EAASI,KAAKE,GAAM,CAClBA,EAAEC,OACFC,EAAmB,CACjBC,KAAMC,EAAYC,OAAOL,EAAEM,QAAQH,KAAK,IAAII,MAAM,IAClDC,mBAAmB,QA0BzB,aArBqBZ,QAAQC,IAC3BF,EAAKG,KAAKW,GACRC,EAAmC,CACjChC,cAAe+B,EAAIR,OACnBU,cAAejC,IACdkC,MAAMC,IACP,MAAMC,EAAYhB,EAAIiB,IAAIF,GAC1B,OAAOC,EACH,CACEA,YACAE,MAAOC,EAAaC,OAClBd,EAAYC,OAAOI,EAAIH,QAAQH,KAAK,WAGxCgB,CAAS,QAKWC,QAAQX,QAAgBU,IAARV,GAEzB"}
1
+ {"version":3,"file":"getSubdomains.mjs","sources":["../../../src/domain/getSubdomains.ts"],"sourcesContent":["import {\r\n Address,\r\n Base58EncodedBytes,\r\n GetProgramAccountsApi,\r\n Rpc,\r\n} from \"@solana/kit\";\r\n\r\nimport { addressCodec, base64Codec } from \"../codecs\";\r\nimport {\r\n NAME_PROGRAM_ADDRESS,\r\n REVERSE_LOOKUP_CLASS,\r\n} from \"../constants/addresses\";\r\nimport { deserializeReverse } from \"../utils/deserializers/deserializeReverse\";\r\nimport { getReverseAddressFromDomainAddress } from \"../utils/getReverseAddressFromDomainAddress\";\r\nimport { getDomainAddress } from \"./getDomainAddress\";\r\n\r\ninterface GetSubdomainsParams {\r\n rpc: Rpc<GetProgramAccountsApi>;\r\n domain: string;\r\n}\r\n\r\ninterface Result {\r\n subdomain: string;\r\n owner: Address;\r\n}\r\n\r\n/**\r\n * Retrieves all subdomains under the specified domain, including their owners.\r\n *\r\n * @param params - An object containing the following properties:\r\n * - `rpc`: An RPC interface implementing GetProgramAccountsApi.\r\n * - `domain`: The domain whose subdomains are to be retrieved.\r\n * @returns A promise that resolves to an array of subdomain objects, each containing the subdomain name and owner address.\r\n */\r\nexport const getSubdomains = async ({\r\n rpc,\r\n domain,\r\n}: GetSubdomainsParams): Promise<Result[]> => {\r\n const { domainAddress, isSub } = await getDomainAddress({ domain });\r\n\r\n if (isSub) return [];\r\n\r\n const getReversesAsync = rpc\r\n .getProgramAccounts(NAME_PROGRAM_ADDRESS, {\r\n encoding: \"base64\",\r\n filters: [\r\n {\r\n memcmp: {\r\n offset: 0n,\r\n bytes: domainAddress as string as Base58EncodedBytes,\r\n encoding: \"base58\",\r\n },\r\n },\r\n {\r\n memcmp: {\r\n offset: 64n,\r\n bytes: REVERSE_LOOKUP_CLASS as string as Base58EncodedBytes,\r\n encoding: \"base58\",\r\n },\r\n },\r\n ],\r\n })\r\n .send();\r\n\r\n const getSubsAsync = rpc\r\n .getProgramAccounts(NAME_PROGRAM_ADDRESS, {\r\n encoding: \"base64\",\r\n filters: [\r\n {\r\n memcmp: {\r\n offset: 0n,\r\n bytes: domainAddress as string as Base58EncodedBytes,\r\n encoding: \"base58\",\r\n },\r\n },\r\n ],\r\n dataSlice: { offset: 32, length: 32 },\r\n })\r\n .send();\r\n\r\n const [reverses, subs] = await Promise.all([getReversesAsync, getSubsAsync]);\r\n\r\n const map = new Map<string, string | undefined>(\r\n reverses.map((e) => [\r\n e.pubkey,\r\n deserializeReverse({\r\n data: base64Codec.encode(e.account.data[0]).slice(96),\r\n trimFirstNullByte: true,\r\n }),\r\n ])\r\n );\r\n\r\n const result = await Promise.all(\r\n subs.map((sub) =>\r\n getReverseAddressFromDomainAddress({\r\n domainAddress: sub.pubkey,\r\n parentAddress: domainAddress,\r\n }).then((revKey) => {\r\n const subdomain = map.get(revKey);\r\n return subdomain\r\n ? {\r\n subdomain,\r\n owner: addressCodec.decode(\r\n base64Codec.encode(sub.account.data[0])\r\n ),\r\n }\r\n : undefined;\r\n })\r\n )\r\n );\r\n\r\n const filteredResult = result.filter((sub) => sub !== undefined);\r\n\r\n return filteredResult;\r\n};\r\n"],"names":["getSubdomains","async","rpc","domain","domainAddress","isSub","getDomainAddress","getReversesAsync","getProgramAccounts","NAME_PROGRAM_ADDRESS","encoding","filters","memcmp","offset","bytes","REVERSE_LOOKUP_CLASS","send","getSubsAsync","dataSlice","length","reverses","subs","Promise","all","map","Map","e","pubkey","deserializeReverse","data","base64Codec","encode","account","slice","trimFirstNullByte","sub","getReverseAddressFromDomainAddress","parentAddress","then","revKey","subdomain","get","owner","addressCodec","decode","undefined","filter"],"mappings":"4YAkCO,MAAMA,EAAgBC,OAC3BC,MACAC,aAEA,MAAMC,cAAEA,EAAaC,MAAEA,SAAgBC,EAAiB,CAAEH,WAE1D,GAAIE,EAAO,MAAO,GAElB,MAAME,EAAmBL,EACtBM,mBAAmBC,EAAsB,CACxCC,SAAU,SACVC,QAAS,CACP,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOV,EACPM,SAAU,WAGd,CACEE,OAAQ,CACNC,OAAQ,IACRC,MAAOC,EACPL,SAAU,cAKjBM,OAEGC,EAAef,EAClBM,mBAAmBC,EAAsB,CACxCC,SAAU,SACVC,QAAS,CACP,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOV,EACPM,SAAU,YAIhBQ,UAAW,CAAEL,OAAQ,GAAIM,OAAQ,MAElCH,QAEII,EAAUC,SAAcC,QAAQC,IAAI,CAAChB,EAAkBU,IAExDO,EAAM,IAAIC,IACdL,EAASI,KAAKE,GAAM,CAClBA,EAAEC,OACFC,EAAmB,CACjBC,KAAMC,EAAYC,OAAOL,EAAEM,QAAQH,KAAK,IAAII,MAAM,IAClDC,mBAAmB,QA0BzB,aArBqBZ,QAAQC,IAC3BF,EAAKG,KAAKW,GACRC,EAAmC,CACjChC,cAAe+B,EAAIR,OACnBU,cAAejC,IACdkC,MAAMC,IACP,MAAMC,EAAYhB,EAAIiB,IAAIF,GAC1B,OAAOC,EACH,CACEA,YACAE,MAAOC,EAAaC,OAClBd,EAAYC,OAAOI,EAAIH,QAAQH,KAAK,WAGxCgB,CAAS,QAKWC,QAAQX,QAAgBU,IAARV,GAEzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"allocateAndPostRecordInstruction.mjs","sources":["../../../src/instructions/allocateAndPostRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n IAccountMeta,\r\n IInstruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class allocateAndPostRecordInstruction {\r\n tag: number;\r\n record: string;\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: { record: string; content: ReadonlyUint8Array }) {\r\n this.tag = 1;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(allocateAndPostRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["allocateAndPostRecordInstruction","tag","record","content","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","payer","domainAddress","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHASaA,EACXC,IACAC,OACAC,QAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,SACRC,QAAS,CAAEG,MAAO,CAAEC,KAAM,SAI9B,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,QAAUM,EAAIN,QAGrB,SAAAQ,GACE,OAAOA,EAAUX,EAAiCY,OAAQF,MAG5D,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAf,EACAgB,EACAC,EACAC,GAEA,MAAMC,EAAOX,KAAKC,YAiClB,MAAO,CACLG,iBACAQ,SAjC+B,CAC/B,CACEC,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,iBAEpB,CACEJ,QAASrB,EACTsB,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"allocateAndPostRecordInstruction.mjs","sources":["../../../src/instructions/allocateAndPostRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n AccountMeta,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class allocateAndPostRecordInstruction {\r\n tag: number;\r\n record: string;\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: { record: string; content: ReadonlyUint8Array }) {\r\n this.tag = 1;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(allocateAndPostRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["allocateAndPostRecordInstruction","tag","record","content","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","payer","domainAddress","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHASaA,EACXC,IACAC,OACAC,QAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,SACRC,QAAS,CAAEG,MAAO,CAAEC,KAAM,SAI9B,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,QAAUM,EAAIN,QAGrB,SAAAQ,GACE,OAAOA,EAAUX,EAAiCY,OAAQF,MAG5D,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAf,EACAgB,EACAC,EACAC,GAEA,MAAMC,EAAOX,KAAKC,YAiClB,MAAO,CACLG,iBACAQ,SAjC8B,CAC9B,CACEC,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,iBAEpB,CACEJ,QAASrB,EACTsB,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"burnDomainInstruction.mjs","sources":["../../../src/instructions/burnDomainInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class burnDomainInstruction {\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 16;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(burnDomainInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameServiceId: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n reverse: Address,\r\n resellingState: Address,\r\n state: Address,\r\n centralState: Address,\r\n owner: Address,\r\n target: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: nameServiceId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverse,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: resellingState,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: target,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["burnDomainInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","nameServiceId","systemProgram","domainAddress","reverse","resellingState","state","centralState","owner","target","data","accounts","address","role","AccountRole","READONLY","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,GAGb,SAAAK,GACE,OAAOA,EAAUN,EAAsBO,OAAQF,MAGjD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOd,KAAKC,YAyClB,MAAO,CACLG,iBACAW,SAzC+B,CAC/B,CACEC,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYE,UAEpB,CACEJ,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYG,iBAEpB,CACEL,QAASH,EACTI,KAAMC,EAAYE,WAOpBN"}
1
+ {"version":3,"file":"burnDomainInstruction.mjs","sources":["../../../src/instructions/burnDomainInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class burnDomainInstruction {\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 16;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(burnDomainInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameServiceId: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n reverse: Address,\r\n resellingState: Address,\r\n state: Address,\r\n centralState: Address,\r\n owner: Address,\r\n target: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: nameServiceId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverse,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: resellingState,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: target,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["burnDomainInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","nameServiceId","systemProgram","domainAddress","reverse","resellingState","state","centralState","owner","target","data","accounts","address","role","AccountRole","READONLY","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,GAGb,SAAAK,GACE,OAAOA,EAAUN,EAAsBO,OAAQF,MAGjD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOd,KAAKC,YAyClB,MAAO,CACLG,iBACAW,SAzC8B,CAC9B,CACEC,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYE,UAEpB,CACEJ,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYG,iBAEpB,CACEL,QAASH,EACTI,KAAMC,EAAYE,WAOpBN"}
@@ -1,2 +1,2 @@
1
- import{getCreateAssociatedTokenIdempotentInstructionDataEncoder as r}from"../node_modules/@solana-program/token/dist/src/index.mjs";import{AccountRole as s}from"@solana/kit";const o=(o,d,e,a,l,t,m)=>({programAddress:o,accounts:[{address:d,role:s.READONLY},{address:e,role:s.READONLY},{address:a,role:s.WRITABLE},{address:l,role:s.WRITABLE},{address:t,role:s.READONLY},{address:m,role:s.READONLY}],data:r().encode({})});export{o as _createAtaInstruction};
1
+ import{getCreateAssociatedTokenIdempotentInstructionDataEncoder as r}from"../node_modules/@solana-program/token/dist/src/index.mjs";import{AccountRole as s}from"@solana/kit";const o=(o,d,e,a,l,t,m)=>({programAddress:o,accounts:[{address:d,role:s.WRITABLE_SIGNER},{address:e,role:s.WRITABLE},{address:a,role:s.READONLY},{address:l,role:s.READONLY},{address:t,role:s.READONLY},{address:m,role:s.READONLY}],data:r().encode({})});export{o as _createAtaInstruction};
2
2
  //# sourceMappingURL=createAtaInstruction.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAtaInstruction.mjs","sources":["../../../src/instructions/createAtaInstruction.ts"],"sourcesContent":["import { getCreateAssociatedTokenIdempotentInstructionDataEncoder } from \"@solana-program/token\";\r\nimport { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\n\r\nexport const _createAtaInstruction = (\r\n programAddress: Address,\r\n payer: Address,\r\n ata: Address,\r\n owner: Address,\r\n mint: Address,\r\n systemProgram: Address,\r\n splTokenProgram: Address\r\n): IInstruction => {\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: payer,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: ata,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: mint,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\r\n };\r\n};\r\n"],"names":["_createAtaInstruction","programAddress","payer","ata","owner","mint","systemProgram","splTokenProgram","accounts","address","role","AccountRole","READONLY","WRITABLE","data","getCreateAssociatedTokenIdempotentInstructionDataEncoder","encode"],"mappings":"8KAGa,MAAAA,EAAwB,CACnCC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,KA6BO,CACLN,iBACAO,SA7B+B,CAC/B,CACEC,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYE,UAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYE,UAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,UAEpB,CACEH,QAASF,EACTG,KAAMC,EAAYC,WAOpBE,KAAMC,IAA2DC,OAAO"}
1
+ {"version":3,"file":"createAtaInstruction.mjs","sources":["../../../src/instructions/createAtaInstruction.ts"],"sourcesContent":["import { getCreateAssociatedTokenIdempotentInstructionDataEncoder } from \"@solana-program/token\";\r\nimport { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\n\r\nexport const _createAtaInstruction = (\r\n programAddress: Address,\r\n payer: Address,\r\n ata: Address,\r\n owner: Address,\r\n mint: Address,\r\n systemProgram: Address,\r\n splTokenProgram: Address\r\n): Instruction => {\r\n const accounts: AccountMeta[] = [\r\n {\n address: payer,\n role: AccountRole.WRITABLE_SIGNER,\n },\n {\n address: ata,\n role: AccountRole.WRITABLE,\n },\n {\n address: owner,\n role: AccountRole.READONLY,\n },\n {\n address: mint,\n role: AccountRole.READONLY,\n },\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\r\n };\r\n};\r\n"],"names":["_createAtaInstruction","programAddress","payer","ata","owner","mint","systemProgram","splTokenProgram","accounts","address","role","AccountRole","WRITABLE_SIGNER","WRITABLE","READONLY","data","getCreateAssociatedTokenIdempotentInstructionDataEncoder","encode"],"mappings":"8KAGa,MAAAA,EAAwB,CACnCC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,KA6BO,CACLN,iBACAO,SA7B8B,CAC9B,CACEC,QAASP,EACTQ,KAAMC,EAAYC,iBAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYG,UAEpB,CACEL,QAASH,EACTI,KAAMC,EAAYG,UAEpB,CACEL,QAASF,EACTG,KAAMC,EAAYG,WAOpBC,KAAMC,IAA2DC,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"createInstructionV3.mjs","sources":["../../../src/instructions/createInstructionV3.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createInstructionV3 {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n referrerIdxOpt: { option: \"u16\" },\r\n },\r\n };\r\n\r\n constructor(obj: {\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n }) {\r\n this.tag = 13;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n this.referrerIdxOpt = obj.referrerIdxOpt;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createInstructionV3.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n buyerTokenSource: Address,\r\n pythMappingAcc: Address,\r\n pythProductAcc: Address,\r\n pythPriceAcc: Address,\r\n vault: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n referrerAccountOpt?: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: pythMappingAcc,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: pythProductAcc,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: pythPriceAcc,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: vault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (referrerAccountOpt) {\r\n accounts.push({\r\n address: referrerAccountOpt,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createInstructionV3","tag","name","space","referrerIdxOpt","static","struct","option","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","buyer","buyerTokenSource","pythMappingAcc","pythProductAcc","pythPriceAcc","vault","splTokenProgram","rentSysvar","state","referrerAccountOpt","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,KACAC,MACAC,eAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,KAAM,SACNC,MAAO,MACPC,eAAgB,CAAEG,OAAQ,SAI9B,WAAAC,CAAYC,GAKVC,KAAKT,IAAM,GACXS,KAAKR,KAAOO,EAAIP,KAChBQ,KAAKP,MAAQM,EAAIN,MACjBO,KAAKN,eAAiBK,EAAIL,eAG5B,SAAAO,GACE,OAAOA,EAAUX,EAAoBY,OAAQF,MAG/C,cAAAG,CACEC,EACAC,EACAC,EACAd,EACAe,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOpB,KAAKC,YAEZoB,EAA2B,CAC/B,CACEC,QAASjB,EACTkB,KAAMC,EAAYC,UAEpB,CACEH,QAAShB,EACTiB,KAAMC,EAAYC,UAEpB,CACEH,QAAS9B,EACT+B,KAAMC,EAAYE,UAEpB,CACEJ,QAASf,EACTgB,KAAMC,EAAYE,UAEpB,CACEJ,QAASd,EACTe,KAAMC,EAAYC,UAEpB,CACEH,QAASb,EACTc,KAAMC,EAAYC,UAEpB,CACEH,QAASZ,EACTa,KAAMC,EAAYG,iBAEpB,CACEL,QAASX,EACTY,KAAMC,EAAYE,UAEpB,CACEJ,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYC,WAWtB,OAPIN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYE,WAIf,CACLtB,iBACAiB,WACAD"}
1
+ {"version":3,"file":"createInstructionV3.mjs","sources":["../../../src/instructions/createInstructionV3.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createInstructionV3 {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n referrerIdxOpt: { option: \"u16\" },\r\n },\r\n };\r\n\r\n constructor(obj: {\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n }) {\r\n this.tag = 13;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n this.referrerIdxOpt = obj.referrerIdxOpt;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createInstructionV3.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n buyerTokenSource: Address,\r\n pythMappingAcc: Address,\r\n pythProductAcc: Address,\r\n pythPriceAcc: Address,\r\n vault: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n referrerAccountOpt?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: pythMappingAcc,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: pythProductAcc,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: pythPriceAcc,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: vault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (referrerAccountOpt) {\r\n accounts.push({\r\n address: referrerAccountOpt,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createInstructionV3","tag","name","space","referrerIdxOpt","static","struct","option","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","buyer","buyerTokenSource","pythMappingAcc","pythProductAcc","pythPriceAcc","vault","splTokenProgram","rentSysvar","state","referrerAccountOpt","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,KACAC,MACAC,eAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,KAAM,SACNC,MAAO,MACPC,eAAgB,CAAEG,OAAQ,SAI9B,WAAAC,CAAYC,GAKVC,KAAKT,IAAM,GACXS,KAAKR,KAAOO,EAAIP,KAChBQ,KAAKP,MAAQM,EAAIN,MACjBO,KAAKN,eAAiBK,EAAIL,eAG5B,SAAAO,GACE,OAAOA,EAAUX,EAAoBY,OAAQF,MAG/C,cAAAG,CACEC,EACAC,EACAC,EACAd,EACAe,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOpB,KAAKC,YAEZoB,EAA0B,CAC9B,CACEC,QAASjB,EACTkB,KAAMC,EAAYC,UAEpB,CACEH,QAAShB,EACTiB,KAAMC,EAAYC,UAEpB,CACEH,QAAS9B,EACT+B,KAAMC,EAAYE,UAEpB,CACEJ,QAASf,EACTgB,KAAMC,EAAYE,UAEpB,CACEJ,QAASd,EACTe,KAAMC,EAAYC,UAEpB,CACEH,QAASb,EACTc,KAAMC,EAAYC,UAEpB,CACEH,QAASZ,EACTa,KAAMC,EAAYG,iBAEpB,CACEL,QAASX,EACTY,KAAMC,EAAYE,UAEpB,CACEJ,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYC,WAWtB,OAPIN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYE,WAIf,CACLtB,iBACAiB,WACAD"}
@@ -1 +1 @@
1
- {"version":3,"file":"createNameRegistryInstruction.mjs","sources":["../../../src/instructions/createNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\nexport class createNameRegistryInstruction {\r\n tag: number;\r\n nameHash: Uint8Array;\r\n lamports: bigint;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n nameHash: { array: { type: \"u8\" } },\r\n lamports: \"u64\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { nameHash: Uint8Array; lamports: bigint; space: number }) {\r\n this.tag = 0;\r\n this.nameHash = obj.nameHash;\r\n this.lamports = obj.lamports;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n owner: Address,\r\n payer: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createNameRegistryInstruction","tag","nameHash","lamports","space","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","domainAddress","owner","payer","classAddress","parentAddress","parentOwner","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE","push","READONLY_SIGNER","DEFAULT_ADDRESS"],"mappings":"iLAKaA,EACXC,IACAC,SACAC,SACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,SAAU,CAAEK,MAAO,CAAEC,KAAM,OAC3BL,SAAU,MACVC,MAAO,QAIX,WAAAK,CAAYC,GACVC,KAAKV,IAAM,EACXU,KAAKT,SAAWQ,EAAIR,SACpBS,KAAKR,SAAWO,EAAIP,SACpBQ,KAAKP,MAAQM,EAAIN,MAGnB,SAAAQ,GACE,OAAOA,EAAUZ,EAA8Ba,OAAQF,MAGzD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAEZY,EAA2B,CAC/B,CACEC,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,iBAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYG,UAEpB,CACEL,QAASP,EACTQ,KAAMC,EAAYC,WAmCtB,OA/BIR,EACFI,EAASO,KAAK,CACZN,QAASL,EACTM,KAAMC,EAAYK,kBAGpBR,EAASO,KAAK,CACZN,QAASQ,EACTP,KAAMC,EAAYC,WAIlBP,EACFG,EAASO,KAAK,CACZN,QAASJ,EACTK,KAAMC,EAAYC,WAGpBJ,EAASO,KAAK,CACZN,QAASQ,EACTP,KAAMC,EAAYC,WAIlBN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYK,kBAIf,CACLjB,iBACAS,WACAD"}
1
+ {"version":3,"file":"createNameRegistryInstruction.mjs","sources":["../../../src/instructions/createNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\nexport class createNameRegistryInstruction {\r\n tag: number;\r\n nameHash: Uint8Array;\r\n lamports: bigint;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n nameHash: { array: { type: \"u8\" } },\r\n lamports: \"u64\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { nameHash: Uint8Array; lamports: bigint; space: number }) {\r\n this.tag = 0;\r\n this.nameHash = obj.nameHash;\r\n this.lamports = obj.lamports;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n owner: Address,\r\n payer: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createNameRegistryInstruction","tag","nameHash","lamports","space","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","domainAddress","owner","payer","classAddress","parentAddress","parentOwner","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE","push","READONLY_SIGNER","DEFAULT_ADDRESS"],"mappings":"iLAKaA,EACXC,IACAC,SACAC,SACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,SAAU,CAAEK,MAAO,CAAEC,KAAM,OAC3BL,SAAU,MACVC,MAAO,QAIX,WAAAK,CAAYC,GACVC,KAAKV,IAAM,EACXU,KAAKT,SAAWQ,EAAIR,SACpBS,KAAKR,SAAWO,EAAIP,SACpBQ,KAAKP,MAAQM,EAAIN,MAGnB,SAAAQ,GACE,OAAOA,EAAUZ,EAA8Ba,OAAQF,MAGzD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAEZY,EAA0B,CAC9B,CACEC,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,iBAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYG,UAEpB,CACEL,QAASP,EACTQ,KAAMC,EAAYC,WAmCtB,OA/BIR,EACFI,EAASO,KAAK,CACZN,QAASL,EACTM,KAAMC,EAAYK,kBAGpBR,EAASO,KAAK,CACZN,QAASQ,EACTP,KAAMC,EAAYC,WAIlBP,EACFG,EAASO,KAAK,CACZN,QAASJ,EACTK,KAAMC,EAAYC,WAGpBJ,EAASO,KAAK,CACZN,QAASQ,EACTP,KAAMC,EAAYC,WAIlBN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYK,kBAIf,CACLjB,iBACAS,WACAD"}
@@ -1 +1 @@
1
- {"version":3,"file":"createReverseInstruction.mjs","sources":["../../../src/instructions/createReverseInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createReverseInstruction {\r\n tag: number;\r\n domain: string;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n domain: \"string\",\r\n },\r\n };\r\n\r\n constructor(obj: { domain: string }) {\r\n this.tag = 12;\r\n this.domain = obj.domain;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createReverseInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n payer: Address,\r\n rentSysvar: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createReverseInstruction","tag","domain","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","payer","rentSysvar","parentAddress","parentOwner","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,OACAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,OAAQ,WAIZ,WAAAG,CAAYC,GACVC,KAAKN,IAAM,GACXM,KAAKL,OAASI,EAAIJ,OAGpB,SAAAM,GACE,OAAOA,EAAUR,EAAyBS,OAAQF,MAGpD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOd,KAAKC,YAEZc,EAA2B,CAC/B,CACEC,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYG,iBAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYC,WAkBtB,OAdIP,GACFG,EAASO,KAAK,CACZN,QAASJ,EACTK,KAAMC,EAAYE,WAIlBP,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYG,kBAIf,CACLjB,iBACAW,WACAD"}
1
+ {"version":3,"file":"createReverseInstruction.mjs","sources":["../../../src/instructions/createReverseInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createReverseInstruction {\r\n tag: number;\r\n domain: string;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n domain: \"string\",\r\n },\r\n };\r\n\r\n constructor(obj: { domain: string }) {\r\n this.tag = 12;\r\n this.domain = obj.domain;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createReverseInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n payer: Address,\r\n rentSysvar: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createReverseInstruction","tag","domain","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","payer","rentSysvar","parentAddress","parentOwner","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,OACAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,OAAQ,WAIZ,WAAAG,CAAYC,GACVC,KAAKN,IAAM,GACXM,KAAKL,OAASI,EAAIJ,OAGpB,SAAAM,GACE,OAAOA,EAAUR,EAAyBS,OAAQF,MAGpD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOd,KAAKC,YAEZc,EAA0B,CAC9B,CACEC,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYG,iBAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYC,WAkBtB,OAdIP,GACFG,EAASO,KAAK,CACZN,QAASJ,EACTK,KAAMC,EAAYE,WAIlBP,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYG,kBAIf,CACLjB,iBACAW,WACAD"}
@@ -1 +1 @@
1
- {"version":3,"file":"createSplitV2Instruction.mjs","sources":["../../../src/instructions/createSplitV2Instruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createSplitV2Instruction {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n referrerIdxOpt: { option: \"u16\" },\r\n },\r\n };\r\n\r\n constructor(obj: {\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n }) {\r\n this.tag = 20;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n this.referrerIdxOpt = obj.referrerIdxOpt;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createSplitV2Instruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n domainOwner: Address,\r\n feePayer: Address,\r\n buyerTokenSource: Address,\r\n pythFeedAccount: Address,\r\n vault: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n referrerAccountOpt?: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: pythFeedAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: vault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (referrerAccountOpt) {\r\n accounts.push({\r\n address: referrerAccountOpt,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createSplitV2Instruction","tag","name","space","referrerIdxOpt","static","struct","option","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","buyer","domainOwner","feePayer","buyerTokenSource","pythFeedAccount","vault","splTokenProgram","rentSysvar","state","referrerAccountOpt","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,KACAC,MACAC,eAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,KAAM,SACNC,MAAO,MACPC,eAAgB,CAAEG,OAAQ,SAI9B,WAAAC,CAAYC,GAKVC,KAAKT,IAAM,GACXS,KAAKR,KAAOO,EAAIP,KAChBQ,KAAKP,MAAQM,EAAIN,MACjBO,KAAKN,eAAiBK,EAAIL,eAG5B,SAAAO,GACE,OAAOA,EAAUX,EAAyBY,OAAQF,MAGpD,cAAAG,CACEC,EACAC,EACAC,EACAd,EACAe,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOpB,KAAKC,YACZoB,EAA2B,CAC/B,CACEC,QAASjB,EACTkB,KAAMC,EAAYC,UAEpB,CACEH,QAAShB,EACTiB,KAAMC,EAAYC,UAEpB,CACEH,QAAS9B,EACT+B,KAAMC,EAAYE,UAEpB,CACEJ,QAASf,EACTgB,KAAMC,EAAYE,UAEpB,CACEJ,QAASd,EACTe,KAAMC,EAAYC,UAEpB,CACEH,QAASb,EACTc,KAAMC,EAAYC,UAEpB,CACEH,QAASZ,EACTa,KAAMC,EAAYG,iBAEpB,CACEL,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYG,iBAEpB,CACEL,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYC,WAWtB,OAPIN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYE,WAIf,CACLtB,iBACAiB,WACAD"}
1
+ {"version":3,"file":"createSplitV2Instruction.mjs","sources":["../../../src/instructions/createSplitV2Instruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createSplitV2Instruction {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n referrerIdxOpt: { option: \"u16\" },\r\n },\r\n };\r\n\r\n constructor(obj: {\r\n name: string;\r\n space: number;\r\n referrerIdxOpt: number | null;\r\n }) {\r\n this.tag = 20;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n this.referrerIdxOpt = obj.referrerIdxOpt;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createSplitV2Instruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n domainOwner: Address,\r\n feePayer: Address,\r\n buyerTokenSource: Address,\r\n pythFeedAccount: Address,\r\n vault: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n referrerAccountOpt?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: pythFeedAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: vault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (referrerAccountOpt) {\r\n accounts.push({\r\n address: referrerAccountOpt,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createSplitV2Instruction","tag","name","space","referrerIdxOpt","static","struct","option","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","buyer","domainOwner","feePayer","buyerTokenSource","pythFeedAccount","vault","splTokenProgram","rentSysvar","state","referrerAccountOpt","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,KACAC,MACAC,eAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,KAAM,SACNC,MAAO,MACPC,eAAgB,CAAEG,OAAQ,SAI9B,WAAAC,CAAYC,GAKVC,KAAKT,IAAM,GACXS,KAAKR,KAAOO,EAAIP,KAChBQ,KAAKP,MAAQM,EAAIN,MACjBO,KAAKN,eAAiBK,EAAIL,eAG5B,SAAAO,GACE,OAAOA,EAAUX,EAAyBY,OAAQF,MAGpD,cAAAG,CACEC,EACAC,EACAC,EACAd,EACAe,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOpB,KAAKC,YACZoB,EAA0B,CAC9B,CACEC,QAASjB,EACTkB,KAAMC,EAAYC,UAEpB,CACEH,QAAShB,EACTiB,KAAMC,EAAYC,UAEpB,CACEH,QAAS9B,EACT+B,KAAMC,EAAYE,UAEpB,CACEJ,QAASf,EACTgB,KAAMC,EAAYE,UAEpB,CACEJ,QAASd,EACTe,KAAMC,EAAYC,UAEpB,CACEH,QAASb,EACTc,KAAMC,EAAYC,UAEpB,CACEH,QAASZ,EACTa,KAAMC,EAAYG,iBAEpB,CACEL,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYG,iBAEpB,CACEL,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYC,WAWtB,OAPIN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYE,WAIf,CACLtB,iBACAiB,WACAD"}
@@ -1 +1 @@
1
- {"version":3,"file":"createV2Instruction.mjs","sources":["../../../src/instructions/createV2Instruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport {\r\n SYSTEM_PROGRAM_ADDRESS,\r\n TOKEN_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\n\r\nexport class createV2Instruction {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { name: string; space: number }) {\r\n this.tag = 9;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createV2Instruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n rentSysvarAccount: Address,\r\n nameProgramId: Address,\r\n rootDomain: Address,\r\n nameAccount: Address,\r\n reverseLookupAccount: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n buyerTokenAccount: Address,\r\n usdcVault: Address,\r\n state: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: rentSysvarAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: nameProgramId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: nameAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookupAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: SYSTEM_PROGRAM_ADDRESS,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: usdcVault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: TOKEN_PROGRAM_ADDRESS,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createV2Instruction","tag","name","space","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","rentSysvarAccount","nameProgramId","rootDomain","nameAccount","reverseLookupAccount","centralState","buyer","buyerTokenAccount","usdcVault","state","data","accounts","address","role","AccountRole","READONLY","WRITABLE","SYSTEM_PROGRAM_ADDRESS","WRITABLE_SIGNER","TOKEN_PROGRAM_ADDRESS"],"mappings":"mNAQaA,EACXC,IACAC,KACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,KAAM,SACNC,MAAO,QAIX,WAAAG,CAAYC,GACVC,KAAKP,IAAM,EACXO,KAAKN,KAAOK,EAAIL,KAChBM,KAAKL,MAAQI,EAAIJ,MAGnB,SAAAM,GACE,OAAOA,EAAUT,EAAoBU,OAAQF,MAG/C,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOf,KAAKC,YAqDlB,MAAO,CACLG,iBACAY,SArD+B,CAC/B,CACEC,QAASZ,EACTa,KAAMC,EAAYC,UAEpB,CACEH,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYE,UAEpB,CACEJ,QAASK,EACTJ,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYI,iBAEpB,CACEN,QAASL,EACTM,KAAMC,EAAYE,UAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYE,UAEpB,CACEJ,QAASO,EACTN,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"createV2Instruction.mjs","sources":["../../../src/instructions/createV2Instruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport {\r\n SYSTEM_PROGRAM_ADDRESS,\r\n TOKEN_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\n\r\nexport class createV2Instruction {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { name: string; space: number }) {\r\n this.tag = 9;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createV2Instruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n rentSysvarAccount: Address,\r\n nameProgramId: Address,\r\n rootDomain: Address,\r\n nameAccount: Address,\r\n reverseLookupAccount: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n buyerTokenAccount: Address,\r\n usdcVault: Address,\r\n state: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: rentSysvarAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: nameProgramId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: nameAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookupAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: SYSTEM_PROGRAM_ADDRESS,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: usdcVault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: TOKEN_PROGRAM_ADDRESS,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createV2Instruction","tag","name","space","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","rentSysvarAccount","nameProgramId","rootDomain","nameAccount","reverseLookupAccount","centralState","buyer","buyerTokenAccount","usdcVault","state","data","accounts","address","role","AccountRole","READONLY","WRITABLE","SYSTEM_PROGRAM_ADDRESS","WRITABLE_SIGNER","TOKEN_PROGRAM_ADDRESS"],"mappings":"mNAQaA,EACXC,IACAC,KACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,KAAM,SACNC,MAAO,QAIX,WAAAG,CAAYC,GACVC,KAAKP,IAAM,EACXO,KAAKN,KAAOK,EAAIL,KAChBM,KAAKL,MAAQI,EAAIJ,MAGnB,SAAAM,GACE,OAAOA,EAAUT,EAAoBU,OAAQF,MAG/C,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOf,KAAKC,YAqDlB,MAAO,CACLG,iBACAY,SArD8B,CAC9B,CACEC,QAASZ,EACTa,KAAMC,EAAYC,UAEpB,CACEH,QAASX,EACTY,KAAMC,EAAYC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAYC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYE,UAEpB,CACEJ,QAASK,EACTJ,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYI,iBAEpB,CACEN,QAASL,EACTM,KAAMC,EAAYE,UAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYE,UAEpB,CACEJ,QAASO,EACTN,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"createWithNftInstruction.mjs","sources":["../../../src/instructions/createWithNftInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createWithNftInstruction {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { name: string; space: number }) {\r\n this.tag = 17;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createWithNftInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n nftSource: Address,\r\n nftMetadata: Address,\r\n nftMint: Address,\r\n masterEdition: Address,\r\n collection: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n mplTokenMetadata: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nftSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMetadata,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMint,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: masterEdition,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: collection,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: mplTokenMetadata,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createWithNftInstruction","tag","name","space","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","buyer","nftSource","nftMetadata","nftMint","masterEdition","collection","splTokenProgram","rentSysvar","state","mplTokenMetadata","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER"],"mappings":"oHAGaA,EACXC,IACAC,KACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,KAAM,SACNC,MAAO,QAIX,WAAAG,CAAYC,GACVC,KAAKP,IAAM,GACXO,KAAKN,KAAOK,EAAIL,KAChBM,KAAKL,MAAQI,EAAIJ,MAGnB,SAAAM,GACE,OAAOA,EAAUT,EAAyBU,OAAQF,MAGpD,cAAAG,CACEC,EACAC,EACAC,EACAZ,EACAa,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOpB,KAAKC,YAqElB,MAAO,CACLG,iBACAiB,SArE+B,CAC/B,CACEC,QAASjB,EACTkB,KAAMC,EAAYC,UAEpB,CACEH,QAAShB,EACTiB,KAAMC,EAAYC,UAEpB,CACEH,QAAS5B,EACT6B,KAAMC,EAAYE,UAEpB,CACEJ,QAASf,EACTgB,KAAMC,EAAYE,UAEpB,CACEJ,QAASd,EACTe,KAAMC,EAAYC,UAEpB,CACEH,QAASb,EACTc,KAAMC,EAAYC,UAEpB,CACEH,QAASZ,EACTa,KAAMC,EAAYG,iBAEpB,CACEL,QAASX,EACTY,KAAMC,EAAYE,UAEpB,CACEJ,QAASV,EACTW,KAAMC,EAAYE,UAEpB,CACEJ,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYE,UAEpB,CACEJ,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"createWithNftInstruction.mjs","sources":["../../../src/instructions/createWithNftInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class createWithNftInstruction {\r\n tag: number;\r\n name: string;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { name: string; space: number }) {\r\n this.tag = 17;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(createWithNftInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n nftSource: Address,\r\n nftMetadata: Address,\r\n nftMint: Address,\r\n masterEdition: Address,\r\n collection: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n mplTokenMetadata: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nftSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMetadata,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMint,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: masterEdition,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: collection,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: mplTokenMetadata,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["createWithNftInstruction","tag","name","space","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","namingServiceProgram","rootDomain","reverseLookup","systemProgram","centralState","buyer","nftSource","nftMetadata","nftMint","masterEdition","collection","splTokenProgram","rentSysvar","state","mplTokenMetadata","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER"],"mappings":"oHAGaA,EACXC,IACAC,KACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,KAAM,SACNC,MAAO,QAIX,WAAAG,CAAYC,GACVC,KAAKP,IAAM,GACXO,KAAKN,KAAOK,EAAIL,KAChBM,KAAKL,MAAQI,EAAIJ,MAGnB,SAAAM,GACE,OAAOA,EAAUT,EAAyBU,OAAQF,MAGpD,cAAAG,CACEC,EACAC,EACAC,EACAZ,EACAa,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOpB,KAAKC,YAqElB,MAAO,CACLG,iBACAiB,SArE8B,CAC9B,CACEC,QAASjB,EACTkB,KAAMC,EAAYC,UAEpB,CACEH,QAAShB,EACTiB,KAAMC,EAAYC,UAEpB,CACEH,QAAS5B,EACT6B,KAAMC,EAAYE,UAEpB,CACEJ,QAASf,EACTgB,KAAMC,EAAYE,UAEpB,CACEJ,QAASd,EACTe,KAAMC,EAAYC,UAEpB,CACEH,QAASb,EACTc,KAAMC,EAAYC,UAEpB,CACEH,QAASZ,EACTa,KAAMC,EAAYG,iBAEpB,CACEL,QAASX,EACTY,KAAMC,EAAYE,UAEpB,CACEJ,QAASV,EACTW,KAAMC,EAAYE,UAEpB,CACEJ,QAAST,EACTU,KAAMC,EAAYE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAYE,UAEpB,CACEJ,QAASP,EACTQ,KAAMC,EAAYE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"deleteNameRegistryInstruction.mjs","sources":["../../../src/instructions/deleteNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class DeleteNameRegistryInstruction {\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 3;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(DeleteNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n refundTarget: Address,\r\n owner: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: refundTarget,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["DeleteNameRegistryInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","domainAddress","refundTarget","owner","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,EAAUN,EAA8BO,OAAQF,MAGzD,cAAAG,CACEC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOR,KAAKC,YAiBlB,MAAO,CACLG,iBACAK,SAjB+B,CAC/B,CACEC,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYE,iBAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"deleteNameRegistryInstruction.mjs","sources":["../../../src/instructions/deleteNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class DeleteNameRegistryInstruction {\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 3;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(DeleteNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n refundTarget: Address,\r\n owner: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: refundTarget,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["DeleteNameRegistryInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","domainAddress","refundTarget","owner","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,EAAUN,EAA8BO,OAAQF,MAGzD,cAAAG,CACEC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOR,KAAKC,YAiBlB,MAAO,CACLG,iBACAK,SAjB8B,CAC9B,CACEC,QAASL,EACTM,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYE,iBAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYC,WAOpBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"deleteRecordInstruction.mjs","sources":["../../../src/instructions/deleteRecordInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class deleteRecordInstruction {\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 5;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(deleteRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["deleteRecordInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","payer","record","domainAddress","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,EAAUN,EAAwBO,OAAQF,MAGnD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAiClB,MAAO,CACLG,iBACAS,SAjC+B,CAC/B,CACEC,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,iBAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"deleteRecordInstruction.mjs","sources":["../../../src/instructions/deleteRecordInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class deleteRecordInstruction {\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 5;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(deleteRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["deleteRecordInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","payer","record","domainAddress","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,EAAUN,EAAwBO,OAAQF,MAGnD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAiClB,MAAO,CACLG,iBACAS,SAjC8B,CAC9B,CACEC,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,iBAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"reallocInstruction.mjs","sources":["../../../src/instructions/reallocInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class ReallocInstruction {\r\n tag: number;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { space: number }) {\r\n this.tag = 4;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ReallocInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgramId: Address,\r\n payerKey: Address,\r\n nameAccountKey: Address,\r\n nameOwnerKey: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: systemProgramId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payerKey,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nameAccountKey,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nameOwnerKey,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["ReallocInstruction","tag","space","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgramId","payerKey","nameAccountKey","nameOwnerKey","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,MAAO,QAIX,WAAAG,CAAYC,GACVC,KAAKN,IAAM,EACXM,KAAKL,MAAQI,EAAIJ,MAGnB,SAAAM,GACE,OAAOA,EAAUR,EAAmBS,OAAQF,MAG9C,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOT,KAAKC,YAqBlB,MAAO,CACLG,iBACAM,SArB+B,CAC/B,CACEC,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYE,iBAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYG,UAEpB,CACEL,QAASH,EACTI,KAAMC,EAAYI,kBAOpBR"}
1
+ {"version":3,"file":"reallocInstruction.mjs","sources":["../../../src/instructions/reallocInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class ReallocInstruction {\r\n tag: number;\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: { space: number }) {\r\n this.tag = 4;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ReallocInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgramId: Address,\r\n payerKey: Address,\r\n nameAccountKey: Address,\r\n nameOwnerKey: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgramId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payerKey,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nameAccountKey,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nameOwnerKey,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["ReallocInstruction","tag","space","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgramId","payerKey","nameAccountKey","nameOwnerKey","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IACAC,MAEAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,MAAO,QAIX,WAAAG,CAAYC,GACVC,KAAKN,IAAM,EACXM,KAAKL,MAAQI,EAAIJ,MAGnB,SAAAM,GACE,OAAOA,EAAUR,EAAmBS,OAAQF,MAG9C,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOT,KAAKC,YAqBlB,MAAO,CACLG,iBACAM,SArB8B,CAC9B,CACEC,QAASN,EACTO,KAAMC,EAAYC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAYE,iBAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAYG,UAEpB,CACEL,QAASH,EACTI,KAAMC,EAAYI,kBAOpBR"}
@@ -1 +1 @@
1
- {"version":3,"file":"registerFavoriteInstruction.mjs","sources":["../../../src/instructions/registerFavoriteInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class registerFavoriteInstruction {\r\n tag: number;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 6;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(registerFavoriteInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameAccount: Address,\r\n favouriteAccount: Address,\r\n owner: Address,\r\n systemProgram: Address,\r\n optParent?: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: nameAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: favouriteAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (optParent) {\r\n accounts.push({\r\n address: optParent,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["registerFavoriteInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","nameAccount","favouriteAccount","owner","systemProgram","optParent","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,EAAUN,EAA4BO,OAAQF,MAGvD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOV,KAAKC,YACZU,EAA2B,CAC/B,CACEC,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAYG,iBAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYC,WAWtB,OAPIN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYC,WAIf,CACLX,iBACAO,WACAD"}
1
+ {"version":3,"file":"registerFavoriteInstruction.mjs","sources":["../../../src/instructions/registerFavoriteInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class registerFavoriteInstruction {\r\n tag: number;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 6;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(registerFavoriteInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameAccount: Address,\r\n favouriteAccount: Address,\r\n owner: Address,\r\n systemProgram: Address,\r\n optParent?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: nameAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: favouriteAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (optParent) {\r\n accounts.push({\r\n address: optParent,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["registerFavoriteInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","nameAccount","favouriteAccount","owner","systemProgram","optParent","data","accounts","address","role","AccountRole","READONLY","WRITABLE","WRITABLE_SIGNER","push"],"mappings":"oHAGaA,EACXC,IACAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,EAAUN,EAA4BO,OAAQF,MAGvD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOV,KAAKC,YACZU,EAA0B,CAC9B,CACEC,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAYG,iBAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYC,WAWtB,OAPIN,GACFE,EAASO,KAAK,CACZN,QAASH,EACTI,KAAMC,EAAYC,WAIf,CACLX,iBACAO,WACAD"}
@@ -1 +1 @@
1
- {"version":3,"file":"transferInstruction.mjs","sources":["../../../src/instructions/transferInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n IAccountMeta,\r\n IInstruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\nexport class TransferInstruction {\r\n tag: number;\r\n encodedNewOwnerAddress: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n encodedNewOwnerAddress: { array: { type: \"u8\", len: 32 } },\r\n },\r\n };\r\n\r\n constructor(obj: { newOwner: Address }) {\r\n this.tag = 2;\r\n this.encodedNewOwnerAddress = addressCodec.encode(obj.newOwner);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(TransferInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n currentOwner: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: parentOwner ? parentOwner : currentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n if (parentOwner && parentAddress) {\r\n if (!classAddress) {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["TransferInstruction","tag","encodedNewOwnerAddress","static","struct","array","type","len","constructor","obj","this","addressCodec","encode","newOwner","serialize","schema","getInstruction","programAddress","domainAddress","currentOwner","classAddress","parentAddress","parentOwner","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER","push","DEFAULT_ADDRESS","READONLY"],"mappings":"8NAYaA,EACXC,IACAC,uBAEAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,uBAAwB,CAAEG,MAAO,CAAEC,KAAM,KAAMC,IAAK,OAIxD,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,uBAAyBS,EAAaC,OAAOH,EAAII,UAGxD,SAAAC,GACE,OAAOA,EAAUd,EAAoBe,OAAQL,MAG/C,cAAAM,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOb,KAAKI,YAEZU,EAA2B,CAC/B,CACEC,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASH,GAA4BH,EACrCO,KAAMC,EAAYE,kBAyBtB,OArBIT,GACFI,EAASM,KAAK,CACZL,QAASL,EACTM,KAAMC,EAAYE,kBAIlBP,GAAeD,IACZD,GACHI,EAASM,KAAK,CACZL,QAASM,EACTL,KAAMC,EAAYK,WAItBR,EAASM,KAAK,CACZL,QAASJ,EACTK,KAAMC,EAAYK,YAIf,CACLf,iBACAO,WACAD"}
1
+ {"version":3,"file":"transferInstruction.mjs","sources":["../../../src/instructions/transferInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n AccountMeta,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\nexport class TransferInstruction {\r\n tag: number;\r\n encodedNewOwnerAddress: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n encodedNewOwnerAddress: { array: { type: \"u8\", len: 32 } },\r\n },\r\n };\r\n\r\n constructor(obj: { newOwner: Address }) {\r\n this.tag = 2;\r\n this.encodedNewOwnerAddress = addressCodec.encode(obj.newOwner);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(TransferInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n currentOwner: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: parentOwner ? parentOwner : currentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n if (parentOwner && parentAddress) {\r\n if (!classAddress) {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["TransferInstruction","tag","encodedNewOwnerAddress","static","struct","array","type","len","constructor","obj","this","addressCodec","encode","newOwner","serialize","schema","getInstruction","programAddress","domainAddress","currentOwner","classAddress","parentAddress","parentOwner","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER","push","DEFAULT_ADDRESS","READONLY"],"mappings":"8NAYaA,EACXC,IACAC,uBAEAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,uBAAwB,CAAEG,MAAO,CAAEC,KAAM,KAAMC,IAAK,OAIxD,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,uBAAyBS,EAAaC,OAAOH,EAAII,UAGxD,SAAAC,GACE,OAAOA,EAAUd,EAAoBe,OAAQL,MAG/C,cAAAM,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOb,KAAKI,YAEZU,EAA0B,CAC9B,CACEC,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASH,GAA4BH,EACrCO,KAAMC,EAAYE,kBAyBtB,OArBIT,GACFI,EAASM,KAAK,CACZL,QAASL,EACTM,KAAMC,EAAYE,kBAIlBP,GAAeD,IACZD,GACHI,EAASM,KAAK,CACZL,QAASM,EACTL,KAAMC,EAAYK,WAItBR,EAASM,KAAK,CACZL,QAASJ,EACTK,KAAMC,EAAYK,YAIf,CACLf,iBACAO,WACAD"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateNameRegistryInstruction.mjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class UpdateNameRegistryInstruction {\r\n tag: number;\r\n offset: number;\r\n inputData: Uint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n offset: \"u32\",\r\n inputData: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: { offset: number; inputDat: Uint8Array }) {\r\n this.tag = 1;\r\n this.offset = obj.offset;\r\n this.inputData = obj.inputDat;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n signer: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: signer,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["UpdateNameRegistryInstruction","tag","offset","inputData","static","struct","array","type","constructor","obj","this","inputDat","serialize","schema","getInstruction","programAddress","domainAddress","signer","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IACAC,OACAC,UAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,MACRC,UAAW,CAAEG,MAAO,CAAEC,KAAM,SAIhC,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,UAAYM,EAAIE,SAGvB,SAAAC,GACE,OAAOA,EAAUZ,EAA8Ba,OAAQH,MAGzD,cAAAI,CACEC,EACAC,EACAC,GAEA,MAAMC,EAAOR,KAAKE,YAalB,MAAO,CACLG,iBACAI,SAb+B,CAC/B,CACEC,QAASJ,EACTK,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYE,kBAOpBN"}
1
+ {"version":3,"file":"updateNameRegistryInstruction.mjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class UpdateNameRegistryInstruction {\r\n tag: number;\r\n offset: number;\r\n inputData: Uint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n offset: \"u32\",\r\n inputData: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: { offset: number; inputDat: Uint8Array }) {\r\n this.tag = 1;\r\n this.offset = obj.offset;\r\n this.inputData = obj.inputDat;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n signer: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: signer,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["UpdateNameRegistryInstruction","tag","offset","inputData","static","struct","array","type","constructor","obj","this","inputDat","serialize","schema","getInstruction","programAddress","domainAddress","signer","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER"],"mappings":"oHAGaA,EACXC,IACAC,OACAC,UAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,MACRC,UAAW,CAAEG,MAAO,CAAEC,KAAM,SAIhC,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,UAAYM,EAAIE,SAGvB,SAAAC,GACE,OAAOA,EAAUZ,EAA8Ba,OAAQH,MAGzD,cAAAI,CACEC,EACAC,EACAC,GAEA,MAAMC,EAAOR,KAAKE,YAalB,MAAO,CACLG,iBACAI,SAb8B,CAC9B,CACEC,QAASJ,EACTK,KAAMC,EAAYC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAYE,kBAOpBN"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateRecordInstruction.mjs","sources":["../../../src/instructions/updateRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n IAccountMeta,\r\n IInstruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class updateRecordInstruction {\r\n tag: number;\r\n record: string;\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: { record: string; content: ReadonlyUint8Array }) {\r\n this.tag = 2;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(updateRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["updateRecordInstruction","tag","record","content","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","feePayer","domain","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHASaA,EACXC,IACAC,OACAC,QAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,SACRC,QAAS,CAAEG,MAAO,CAAEC,KAAM,SAI9B,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,QAAUM,EAAIN,QAGrB,SAAAQ,GACE,OAAOA,EAAUX,EAAwBY,OAAQF,MAGnD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAf,EACAgB,EACAC,EACAC,GAEA,MAAMC,EAAOX,KAAKC,YAiClB,MAAO,CACLG,iBACAQ,SAjC+B,CAC/B,CACEC,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,iBAEpB,CACEJ,QAASrB,EACTsB,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"updateRecordInstruction.mjs","sources":["../../../src/instructions/updateRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n AccountMeta,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class updateRecordInstruction {\r\n tag: number;\r\n record: string;\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: { record: string; content: ReadonlyUint8Array }) {\r\n this.tag = 2;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(updateRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["updateRecordInstruction","tag","record","content","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","feePayer","domain","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHASaA,EACXC,IACAC,OACAC,QAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,SACRC,QAAS,CAAEG,MAAO,CAAEC,KAAM,SAI9B,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,QAAUM,EAAIN,QAGrB,SAAAQ,GACE,OAAOA,EAAUX,EAAwBY,OAAQF,MAGnD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAf,EACAgB,EACAC,EACAC,GAEA,MAAMC,EAAOX,KAAKC,YAiClB,MAAO,CACLG,iBACAQ,SAjC8B,CAC9B,CACEC,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAYE,iBAEpB,CACEJ,QAASrB,EACTsB,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"validateRoaEthereumInstruction.mjs","sources":["../../../src/instructions/validateRoaEthereumInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n IAccountMeta,\r\n IInstruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class validateRoaEthereumInstruction {\r\n tag: number;\r\n validation: number;\r\n signature: ReadonlyUint8Array;\r\n expectedPubkey: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n validation: \"u8\",\r\n signature: { array: { type: \"u8\" } },\r\n expectedPubkey: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: {\r\n validation: number;\r\n signature: ReadonlyUint8Array;\r\n expectedPubkey: ReadonlyUint8Array;\r\n }) {\r\n this.tag = 4;\r\n this.validation = obj.validation;\r\n this.signature = obj.signature;\r\n this.expectedPubkey = obj.expectedPubkey;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(validateRoaEthereumInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): IInstruction {\r\n const data = this.serialize();\r\n\r\n const accounts: IAccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["validateRoaEthereumInstruction","tag","validation","signature","expectedPubkey","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","feePayer","record","domain","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHASaA,EACXC,IACAC,WACAC,UACAC,eAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,WAAY,KACZC,UAAW,CAAEI,MAAO,CAAEC,KAAM,OAC5BJ,eAAgB,CAAEG,MAAO,CAAEC,KAAM,SAIrC,WAAAC,CAAYC,GAKVC,KAAKV,IAAM,EACXU,KAAKT,WAAaQ,EAAIR,WACtBS,KAAKR,UAAYO,EAAIP,UACrBQ,KAAKP,eAAiBM,EAAIN,eAG5B,SAAAQ,GACE,OAAOA,EAAUZ,EAA+Ba,OAAQF,MAG1D,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAiClB,MAAO,CACLG,iBACAS,SAjC+B,CAC/B,CACEC,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,iBAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}
1
+ {"version":3,"file":"validateRoaEthereumInstruction.mjs","sources":["../../../src/instructions/validateRoaEthereumInstruction.ts"],"sourcesContent":["import {\r\n AccountRole,\r\n Address,\r\n AccountMeta,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class validateRoaEthereumInstruction {\r\n tag: number;\r\n validation: number;\r\n signature: ReadonlyUint8Array;\r\n expectedPubkey: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n validation: \"u8\",\r\n signature: { array: { type: \"u8\" } },\r\n expectedPubkey: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: {\r\n validation: number;\r\n signature: ReadonlyUint8Array;\r\n expectedPubkey: ReadonlyUint8Array;\r\n }) {\r\n this.tag = 4;\r\n this.validation = obj.validation;\r\n this.signature = obj.signature;\r\n this.expectedPubkey = obj.expectedPubkey;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(validateRoaEthereumInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["validateRoaEthereumInstruction","tag","validation","signature","expectedPubkey","static","struct","array","type","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","feePayer","record","domain","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"oHASaA,EACXC,IACAC,WACAC,UACAC,eAEAC,cAAgB,CACdC,OAAQ,CACNL,IAAK,KACLC,WAAY,KACZC,UAAW,CAAEI,MAAO,CAAEC,KAAM,OAC5BJ,eAAgB,CAAEG,MAAO,CAAEC,KAAM,SAIrC,WAAAC,CAAYC,GAKVC,KAAKV,IAAM,EACXU,KAAKT,WAAaQ,EAAIR,WACtBS,KAAKR,UAAYO,EAAIP,UACrBQ,KAAKP,eAAiBM,EAAIN,eAG5B,SAAAQ,GACE,OAAOA,EAAUZ,EAA+Ba,OAAQF,MAG1D,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAiClB,MAAO,CACLG,iBACAS,SAjC8B,CAC9B,CACEC,QAAST,EACTU,KAAMC,EAAYC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAYC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAYE,iBAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAYG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAYG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAYE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAYC,WAOpBL"}