mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-13 23:16:55 +00:00
feat: added langchain class, refactored methods to use tlb parser, wrote and ran tests
This commit is contained in:
0
package-lock.json
generated
0
package-lock.json
generated
@@ -7,7 +7,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"docs": "typedoc src --out docs",
|
||||
"test": "ts-node test/index.ts",
|
||||
"test": "ts-node test/**/*.ts",
|
||||
"generate": "ts-node src/utils/keypair.ts"
|
||||
},
|
||||
"engines": {
|
||||
@@ -32,6 +32,7 @@
|
||||
"@metaplex-foundation/umi": "^0.9.2",
|
||||
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
|
||||
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
|
||||
"@onsol/tldparser": "^0.6.7",
|
||||
"@orca-so/common-sdk": "0.6.4",
|
||||
"@orca-so/whirlpools-sdk": "^0.13.12",
|
||||
"@pythnetwork/price-service-client": "^1.9.0",
|
||||
@@ -40,6 +41,7 @@
|
||||
"@solana/web3.js": "^1.95.4",
|
||||
"bn.js": "^5.2.1",
|
||||
"bs58": "^6.0.0",
|
||||
"chai": "^5.1.2",
|
||||
"decimal.js": "^10.4.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"form-data": "^4.0.1",
|
||||
@@ -49,6 +51,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bn.js": "^5.1.5",
|
||||
"@types/chai": "^5.0.1",
|
||||
"@types/node": "^22.9.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.7.2"
|
||||
|
||||
428
pnpm-lock.yaml
generated
428
pnpm-lock.yaml
generated
@@ -50,6 +50,9 @@ importers:
|
||||
'@metaplex-foundation/umi-web3js-adapters':
|
||||
specifier: ^0.9.2
|
||||
version: 0.9.2(@metaplex-foundation/umi@0.9.2)(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))
|
||||
'@onsol/tldparser':
|
||||
specifier: ^0.6.7
|
||||
version: 0.6.7(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bn.js@5.2.1)(borsh@2.0.0)(buffer@6.0.3)(bufferutil@4.0.8)(utf-8-validate@5.0.10)
|
||||
'@orca-so/common-sdk':
|
||||
specifier: 0.6.4
|
||||
version: 0.6.4(@solana/spl-token@0.4.9(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2)(utf-8-validate@5.0.10))(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(decimal.js@10.4.3)
|
||||
@@ -74,6 +77,9 @@ importers:
|
||||
bs58:
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
chai:
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2
|
||||
decimal.js:
|
||||
specifier: ^10.4.3
|
||||
version: 10.4.3
|
||||
@@ -96,6 +102,9 @@ importers:
|
||||
'@types/bn.js':
|
||||
specifier: ^5.1.5
|
||||
version: 5.1.6
|
||||
'@types/chai':
|
||||
specifier: ^5.0.1
|
||||
version: 5.0.1
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.10.2
|
||||
@@ -139,6 +148,15 @@ packages:
|
||||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
'@ethersproject/bytes@5.7.0':
|
||||
resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==}
|
||||
|
||||
'@ethersproject/logger@5.7.0':
|
||||
resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==}
|
||||
|
||||
'@ethersproject/sha2@5.7.0':
|
||||
resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==}
|
||||
|
||||
'@jridgewell/resolve-uri@3.1.2':
|
||||
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
@@ -194,6 +212,12 @@ packages:
|
||||
'@lightprotocol/stateless.js@0.17.1':
|
||||
resolution: {integrity: sha512-EjId1n33A6dBwpce33Wsa/fs/CDKtMtRrkxbApH0alXrnEXmbW6QhIViXOrKYXjZ4uJQM1xsBtsKe0vqJ4nbtQ==}
|
||||
|
||||
'@metaplex-foundation/beet-solana@0.4.1':
|
||||
resolution: {integrity: sha512-/6o32FNUtwK8tjhotrvU/vorP7umBuRFvBZrC6XCk51aKidBHe5LPVPA5AjGPbV3oftMfRuXPNd9yAGeEqeCDQ==}
|
||||
|
||||
'@metaplex-foundation/beet@0.7.2':
|
||||
resolution: {integrity: sha512-K+g3WhyFxKPc0xIvcIjNyV1eaTVJTiuaHZpig7Xx0MuYRMoJLLvhLTnUXhFdR5Tu2l2QSyKwfyXDgZlzhULqFg==}
|
||||
|
||||
'@metaplex-foundation/mpl-core@1.1.1':
|
||||
resolution: {integrity: sha512-h1kLw+cGaV8SiykoHDb1/G01+VYqtJXAt0uGuO5+2Towsdtc6ET4M62iqUnh4EacTVMIW1yYHsKsG/LYWBCKaA==}
|
||||
peerDependencies:
|
||||
@@ -306,6 +330,15 @@ packages:
|
||||
resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==}
|
||||
engines: {node: ^14.21.3 || >=16}
|
||||
|
||||
'@onsol/tldparser@0.6.7':
|
||||
resolution: {integrity: sha512-QwkRDLyC514pxeplCCXZ2kTiRcJSeUrpp+9o2XqLbePy/qzZGGG8I0UbXUKuWVD/bUL1zAm21+D+Eu30OKwcQg==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
'@solana/web3.js': ^1.95.3
|
||||
bn.js: ^5.2.1
|
||||
borsh: ^0.7.0
|
||||
buffer: 6.0.1
|
||||
|
||||
'@orca-so/common-sdk@0.6.4':
|
||||
resolution: {integrity: sha512-iOiC6exTA9t2CEOaUPoWlNP3soN/1yZFjoz1mSf7NvOqo/PJZeIdWpB7BRXwU0mGGatjxU4SFgMGQ8NrSx+ONw==}
|
||||
peerDependencies:
|
||||
@@ -526,9 +559,15 @@ packages:
|
||||
'@types/bn.js@5.1.6':
|
||||
resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==}
|
||||
|
||||
'@types/chai@5.0.1':
|
||||
resolution: {integrity: sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==}
|
||||
|
||||
'@types/connect@3.4.38':
|
||||
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
|
||||
|
||||
'@types/deep-eql@4.0.2':
|
||||
resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}
|
||||
|
||||
'@types/hast@3.0.4':
|
||||
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
|
||||
|
||||
@@ -596,15 +635,29 @@ packages:
|
||||
resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
ansicolors@0.3.2:
|
||||
resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==}
|
||||
|
||||
arg@4.1.3:
|
||||
resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}
|
||||
|
||||
argparse@2.0.1:
|
||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||
|
||||
assert@2.1.0:
|
||||
resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==}
|
||||
|
||||
assertion-error@2.0.1:
|
||||
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
asynckit@0.4.0:
|
||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||
|
||||
available-typed-arrays@1.0.7:
|
||||
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
axios-retry@3.9.1:
|
||||
resolution: {integrity: sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w==}
|
||||
|
||||
@@ -674,6 +727,18 @@ packages:
|
||||
resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==}
|
||||
engines: {node: '>=6.14.2'}
|
||||
|
||||
call-bind-apply-helpers@1.0.1:
|
||||
resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
call-bind@1.0.8:
|
||||
resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
call-bound@1.0.3:
|
||||
resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
camelcase@6.3.0:
|
||||
resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -681,6 +746,10 @@ packages:
|
||||
ccount@2.0.1:
|
||||
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
|
||||
|
||||
chai@5.1.2:
|
||||
resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
chalk@5.4.0:
|
||||
resolution: {integrity: sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
@@ -691,6 +760,10 @@ packages:
|
||||
character-entities-legacy@3.0.0:
|
||||
resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==}
|
||||
|
||||
check-error@2.1.1:
|
||||
resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}
|
||||
engines: {node: '>= 16'}
|
||||
|
||||
combined-stream@1.0.8:
|
||||
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
@@ -722,6 +795,15 @@ packages:
|
||||
dayjs@1.11.13:
|
||||
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
|
||||
|
||||
debug@4.4.0:
|
||||
resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==}
|
||||
engines: {node: '>=6.0'}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
|
||||
decamelize@1.2.0:
|
||||
resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -732,6 +814,18 @@ packages:
|
||||
decimal.js@10.4.3:
|
||||
resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==}
|
||||
|
||||
deep-eql@5.0.2:
|
||||
resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
define-data-property@1.1.4:
|
||||
resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
define-properties@1.2.1:
|
||||
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
delay@5.0.0:
|
||||
resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -758,6 +852,10 @@ packages:
|
||||
resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
dunder-proto@1.0.1:
|
||||
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
emoji-regex-xs@1.0.0:
|
||||
resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==}
|
||||
|
||||
@@ -765,6 +863,18 @@ packages:
|
||||
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
||||
engines: {node: '>=0.12'}
|
||||
|
||||
es-define-property@1.0.1:
|
||||
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
es-errors@1.3.0:
|
||||
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
es-object-atoms@1.0.0:
|
||||
resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
es6-promise@4.2.8:
|
||||
resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==}
|
||||
|
||||
@@ -803,6 +913,9 @@ packages:
|
||||
debug:
|
||||
optional: true
|
||||
|
||||
for-each@0.3.3:
|
||||
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
|
||||
|
||||
form-data-encoder@1.7.2:
|
||||
resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==}
|
||||
|
||||
@@ -814,6 +927,17 @@ packages:
|
||||
resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==}
|
||||
engines: {node: '>= 12.20'}
|
||||
|
||||
function-bind@1.1.2:
|
||||
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
|
||||
|
||||
get-intrinsic@1.2.6:
|
||||
resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
gopd@1.2.0:
|
||||
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
@@ -823,6 +947,24 @@ packages:
|
||||
groq-sdk@0.5.0:
|
||||
resolution: {integrity: sha512-RVmhW7qZ+XZoy5fIuSdx/LGQJONpL8MHgZEW7dFwTdgkzStub2XQx6OKv28CHogijdwH41J+Npj/z2jBPu3vmw==}
|
||||
|
||||
has-property-descriptors@1.0.2:
|
||||
resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
|
||||
|
||||
has-symbols@1.1.0:
|
||||
resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
has-tostringtag@1.0.2:
|
||||
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
hash.js@1.1.7:
|
||||
resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==}
|
||||
|
||||
hasown@2.0.2:
|
||||
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
hast-util-to-html@9.0.4:
|
||||
resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==}
|
||||
|
||||
@@ -838,10 +980,33 @@ packages:
|
||||
ieee754@1.2.1:
|
||||
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
||||
|
||||
inherits@2.0.4:
|
||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||
|
||||
ipaddr.js@2.2.0:
|
||||
resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
is-arguments@1.2.0:
|
||||
resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-callable@1.2.7:
|
||||
resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-generator-function@1.0.10:
|
||||
resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-nan@1.3.2:
|
||||
resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-typed-array@1.1.15:
|
||||
resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-retry-allowed@2.2.0:
|
||||
resolution: {integrity: sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -945,6 +1110,9 @@ packages:
|
||||
lodash@4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
|
||||
loupe@3.1.2:
|
||||
resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==}
|
||||
|
||||
lower-case@2.0.2:
|
||||
resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==}
|
||||
|
||||
@@ -958,6 +1126,10 @@ packages:
|
||||
resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
|
||||
hasBin: true
|
||||
|
||||
math-intrinsics@1.1.0:
|
||||
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
mdast-util-to-hast@13.2.0:
|
||||
resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==}
|
||||
|
||||
@@ -987,6 +1159,9 @@ packages:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
minimalistic-assert@1.0.1:
|
||||
resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==}
|
||||
|
||||
minimatch@9.0.5:
|
||||
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
@@ -1021,6 +1196,18 @@ packages:
|
||||
resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==}
|
||||
hasBin: true
|
||||
|
||||
object-is@1.1.6:
|
||||
resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
object-keys@1.1.1:
|
||||
resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
object.assign@4.1.7:
|
||||
resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
oniguruma-to-es@0.8.0:
|
||||
resolution: {integrity: sha512-rY+/a6b+uCgoYIL9itjY0x99UUDHXmGaw7Jjk5ZvM/3cxDJifyxFr/Zm4tTmF6Tre18gAakJo7AzhKUeMNLgHA==}
|
||||
|
||||
@@ -1058,6 +1245,14 @@ packages:
|
||||
pako@2.1.0:
|
||||
resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==}
|
||||
|
||||
pathval@2.0.0:
|
||||
resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==}
|
||||
engines: {node: '>= 14.16'}
|
||||
|
||||
possible-typed-array-names@1.0.0:
|
||||
resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
property-information@6.5.0:
|
||||
resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==}
|
||||
|
||||
@@ -1099,6 +1294,10 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
hasBin: true
|
||||
|
||||
set-function-length@1.2.2:
|
||||
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
shiki@1.24.3:
|
||||
resolution: {integrity: sha512-eMeX/ehE2IDKVs71kB4zVcDHjutNcOtm+yIRuR4sA6ThBbdFI0DffGJiyoKCodj0xRGxIoWC3pk/Anmm5mzHmA==}
|
||||
|
||||
@@ -1220,6 +1419,9 @@ packages:
|
||||
resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==}
|
||||
engines: {node: '>=6.14.2'}
|
||||
|
||||
util@0.12.5:
|
||||
resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==}
|
||||
|
||||
uuid@10.0.0:
|
||||
resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==}
|
||||
hasBin: true
|
||||
@@ -1255,6 +1457,10 @@ packages:
|
||||
whatwg-url@5.0.0:
|
||||
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
|
||||
|
||||
which-typed-array@1.1.18:
|
||||
resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
ws@7.5.10:
|
||||
resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==}
|
||||
engines: {node: '>=8.3.0'}
|
||||
@@ -1364,6 +1570,18 @@ snapshots:
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.9
|
||||
|
||||
'@ethersproject/bytes@5.7.0':
|
||||
dependencies:
|
||||
'@ethersproject/logger': 5.7.0
|
||||
|
||||
'@ethersproject/logger@5.7.0': {}
|
||||
|
||||
'@ethersproject/sha2@5.7.0':
|
||||
dependencies:
|
||||
'@ethersproject/bytes': 5.7.0
|
||||
'@ethersproject/logger': 5.7.0
|
||||
hash.js: 1.1.7
|
||||
|
||||
'@jridgewell/resolve-uri@3.1.2': {}
|
||||
|
||||
'@jridgewell/sourcemap-codec@1.5.0': {}
|
||||
@@ -1463,6 +1681,27 @@ snapshots:
|
||||
- encoding
|
||||
- utf-8-validate
|
||||
|
||||
'@metaplex-foundation/beet-solana@0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
|
||||
dependencies:
|
||||
'@metaplex-foundation/beet': 0.7.2
|
||||
'@solana/web3.js': 1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)
|
||||
bs58: 5.0.0
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- encoding
|
||||
- supports-color
|
||||
- utf-8-validate
|
||||
|
||||
'@metaplex-foundation/beet@0.7.2':
|
||||
dependencies:
|
||||
ansicolors: 0.3.2
|
||||
assert: 2.1.0
|
||||
bn.js: 5.2.1
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@metaplex-foundation/mpl-core@1.1.1(@metaplex-foundation/umi@0.9.2)(@noble/hashes@1.6.1)':
|
||||
dependencies:
|
||||
'@metaplex-foundation/umi': 0.9.2
|
||||
@@ -1583,6 +1822,20 @@ snapshots:
|
||||
|
||||
'@noble/hashes@1.6.1': {}
|
||||
|
||||
'@onsol/tldparser@0.6.7(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bn.js@5.2.1)(borsh@2.0.0)(buffer@6.0.3)(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
|
||||
dependencies:
|
||||
'@ethersproject/sha2': 5.7.0
|
||||
'@metaplex-foundation/beet-solana': 0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
|
||||
'@solana/web3.js': 1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)
|
||||
bn.js: 5.2.1
|
||||
borsh: 2.0.0
|
||||
buffer: 6.0.3
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- encoding
|
||||
- supports-color
|
||||
- utf-8-validate
|
||||
|
||||
'@orca-so/common-sdk@0.6.4(@solana/spl-token@0.4.9(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2)(utf-8-validate@5.0.10))(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(decimal.js@10.4.3)':
|
||||
dependencies:
|
||||
'@solana/spl-token': 0.4.9(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2)(utf-8-validate@5.0.10)
|
||||
@@ -1983,10 +2236,16 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
|
||||
'@types/chai@5.0.1':
|
||||
dependencies:
|
||||
'@types/deep-eql': 4.0.2
|
||||
|
||||
'@types/connect@3.4.38':
|
||||
dependencies:
|
||||
'@types/node': 22.10.2
|
||||
|
||||
'@types/deep-eql@4.0.2': {}
|
||||
|
||||
'@types/hast@3.0.4':
|
||||
dependencies:
|
||||
'@types/unist': 3.0.3
|
||||
@@ -2051,12 +2310,28 @@ snapshots:
|
||||
|
||||
ansi-styles@5.2.0: {}
|
||||
|
||||
ansicolors@0.3.2: {}
|
||||
|
||||
arg@4.1.3: {}
|
||||
|
||||
argparse@2.0.1: {}
|
||||
|
||||
assert@2.1.0:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
is-nan: 1.3.2
|
||||
object-is: 1.1.6
|
||||
object.assign: 4.1.7
|
||||
util: 0.12.5
|
||||
|
||||
assertion-error@2.0.1: {}
|
||||
|
||||
asynckit@0.4.0: {}
|
||||
|
||||
available-typed-arrays@1.0.7:
|
||||
dependencies:
|
||||
possible-typed-array-names: 1.0.0
|
||||
|
||||
axios-retry@3.9.1:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.26.0
|
||||
@@ -2134,16 +2409,43 @@ snapshots:
|
||||
node-gyp-build: 4.8.4
|
||||
optional: true
|
||||
|
||||
call-bind-apply-helpers@1.0.1:
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
function-bind: 1.1.2
|
||||
|
||||
call-bind@1.0.8:
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
es-define-property: 1.0.1
|
||||
get-intrinsic: 1.2.6
|
||||
set-function-length: 1.2.2
|
||||
|
||||
call-bound@1.0.3:
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
get-intrinsic: 1.2.6
|
||||
|
||||
camelcase@6.3.0: {}
|
||||
|
||||
ccount@2.0.1: {}
|
||||
|
||||
chai@5.1.2:
|
||||
dependencies:
|
||||
assertion-error: 2.0.1
|
||||
check-error: 2.1.1
|
||||
deep-eql: 5.0.2
|
||||
loupe: 3.1.2
|
||||
pathval: 2.0.0
|
||||
|
||||
chalk@5.4.0: {}
|
||||
|
||||
character-entities-html4@2.1.0: {}
|
||||
|
||||
character-entities-legacy@3.0.0: {}
|
||||
|
||||
check-error@2.1.1: {}
|
||||
|
||||
combined-stream@1.0.8:
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
@@ -2168,12 +2470,30 @@ snapshots:
|
||||
|
||||
dayjs@1.11.13: {}
|
||||
|
||||
debug@4.4.0:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
|
||||
decamelize@1.2.0: {}
|
||||
|
||||
decimal.js-light@2.5.1: {}
|
||||
|
||||
decimal.js@10.4.3: {}
|
||||
|
||||
deep-eql@5.0.2: {}
|
||||
|
||||
define-data-property@1.1.4:
|
||||
dependencies:
|
||||
es-define-property: 1.0.1
|
||||
es-errors: 1.3.0
|
||||
gopd: 1.2.0
|
||||
|
||||
define-properties@1.2.1:
|
||||
dependencies:
|
||||
define-data-property: 1.1.4
|
||||
has-property-descriptors: 1.0.2
|
||||
object-keys: 1.1.1
|
||||
|
||||
delay@5.0.0: {}
|
||||
|
||||
delayed-stream@1.0.0: {}
|
||||
@@ -2193,10 +2513,24 @@ snapshots:
|
||||
|
||||
dotenv@16.4.7: {}
|
||||
|
||||
dunder-proto@1.0.1:
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
es-errors: 1.3.0
|
||||
gopd: 1.2.0
|
||||
|
||||
emoji-regex-xs@1.0.0: {}
|
||||
|
||||
entities@4.5.0: {}
|
||||
|
||||
es-define-property@1.0.1: {}
|
||||
|
||||
es-errors@1.3.0: {}
|
||||
|
||||
es-object-atoms@1.0.0:
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
|
||||
es6-promise@4.2.8: {}
|
||||
|
||||
es6-promisify@5.0.0:
|
||||
@@ -2219,6 +2553,10 @@ snapshots:
|
||||
|
||||
follow-redirects@1.15.9: {}
|
||||
|
||||
for-each@0.3.3:
|
||||
dependencies:
|
||||
is-callable: 1.2.7
|
||||
|
||||
form-data-encoder@1.7.2: {}
|
||||
|
||||
form-data@4.0.1:
|
||||
@@ -2232,6 +2570,23 @@ snapshots:
|
||||
node-domexception: 1.0.0
|
||||
web-streams-polyfill: 4.0.0-beta.3
|
||||
|
||||
function-bind@1.1.2: {}
|
||||
|
||||
get-intrinsic@1.2.6:
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
dunder-proto: 1.0.1
|
||||
es-define-property: 1.0.1
|
||||
es-errors: 1.3.0
|
||||
es-object-atoms: 1.0.0
|
||||
function-bind: 1.1.2
|
||||
gopd: 1.2.0
|
||||
has-symbols: 1.1.0
|
||||
hasown: 2.0.2
|
||||
math-intrinsics: 1.1.0
|
||||
|
||||
gopd@1.2.0: {}
|
||||
|
||||
graceful-fs@4.2.11:
|
||||
optional: true
|
||||
|
||||
@@ -2253,6 +2608,25 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
|
||||
has-property-descriptors@1.0.2:
|
||||
dependencies:
|
||||
es-define-property: 1.0.1
|
||||
|
||||
has-symbols@1.1.0: {}
|
||||
|
||||
has-tostringtag@1.0.2:
|
||||
dependencies:
|
||||
has-symbols: 1.1.0
|
||||
|
||||
hash.js@1.1.7:
|
||||
dependencies:
|
||||
inherits: 2.0.4
|
||||
minimalistic-assert: 1.0.1
|
||||
|
||||
hasown@2.0.2:
|
||||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
|
||||
hast-util-to-html@9.0.4:
|
||||
dependencies:
|
||||
'@types/hast': 3.0.4
|
||||
@@ -2279,6 +2653,8 @@ snapshots:
|
||||
|
||||
ieee754@1.2.1: {}
|
||||
|
||||
inherits@2.0.4: {}
|
||||
|
||||
ipaddr.js@2.2.0: {}
|
||||
|
||||
is-retry-allowed@2.2.0: {}
|
||||
@@ -2372,6 +2748,8 @@ snapshots:
|
||||
|
||||
lodash@4.17.21: {}
|
||||
|
||||
loupe@3.1.2: {}
|
||||
|
||||
lower-case@2.0.2:
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
@@ -2389,6 +2767,8 @@ snapshots:
|
||||
punycode.js: 2.3.1
|
||||
uc.micro: 2.1.0
|
||||
|
||||
math-intrinsics@1.1.0: {}
|
||||
|
||||
mdast-util-to-hast@13.2.0:
|
||||
dependencies:
|
||||
'@types/hast': 3.0.4
|
||||
@@ -2426,6 +2806,8 @@ snapshots:
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
|
||||
minimalistic-assert@1.0.1: {}
|
||||
|
||||
minimatch@9.0.5:
|
||||
dependencies:
|
||||
brace-expansion: 2.0.1
|
||||
@@ -2450,6 +2832,22 @@ snapshots:
|
||||
node-gyp-build@4.8.4:
|
||||
optional: true
|
||||
|
||||
object-is@1.1.6:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
define-properties: 1.2.1
|
||||
|
||||
object-keys@1.1.1: {}
|
||||
|
||||
object.assign@4.1.7:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
call-bound: 1.0.3
|
||||
define-properties: 1.2.1
|
||||
es-object-atoms: 1.0.0
|
||||
has-symbols: 1.1.0
|
||||
object-keys: 1.1.1
|
||||
|
||||
oniguruma-to-es@0.8.0:
|
||||
dependencies:
|
||||
emoji-regex-xs: 1.0.0
|
||||
@@ -2492,6 +2890,10 @@ snapshots:
|
||||
|
||||
pako@2.1.0: {}
|
||||
|
||||
pathval@2.0.0: {}
|
||||
|
||||
possible-typed-array-names@1.0.0: {}
|
||||
|
||||
property-information@6.5.0: {}
|
||||
|
||||
proxy-from-env@1.1.0: {}
|
||||
@@ -2531,6 +2933,15 @@ snapshots:
|
||||
|
||||
semver@7.6.3: {}
|
||||
|
||||
set-function-length@1.2.2:
|
||||
dependencies:
|
||||
define-data-property: 1.1.4
|
||||
es-errors: 1.3.0
|
||||
function-bind: 1.1.2
|
||||
get-intrinsic: 1.2.6
|
||||
gopd: 1.2.0
|
||||
has-property-descriptors: 1.0.2
|
||||
|
||||
shiki@1.24.3:
|
||||
dependencies:
|
||||
'@shikijs/core': 1.24.3
|
||||
@@ -2656,6 +3067,14 @@ snapshots:
|
||||
node-gyp-build: 4.8.4
|
||||
optional: true
|
||||
|
||||
util@0.12.5:
|
||||
dependencies:
|
||||
inherits: 2.0.4
|
||||
is-arguments: 1.2.0
|
||||
is-generator-function: 1.0.10
|
||||
is-typed-array: 1.1.15
|
||||
which-typed-array: 1.1.18
|
||||
|
||||
uuid@10.0.0: {}
|
||||
|
||||
uuid@8.3.2: {}
|
||||
@@ -2685,6 +3104,15 @@ snapshots:
|
||||
tr46: 0.0.3
|
||||
webidl-conversions: 3.0.1
|
||||
|
||||
which-typed-array@1.1.18:
|
||||
dependencies:
|
||||
available-typed-arrays: 1.0.7
|
||||
call-bind: 1.0.8
|
||||
call-bound: 1.0.3
|
||||
for-each: 0.3.3
|
||||
gopd: 1.2.0
|
||||
has-tostringtag: 1.0.2
|
||||
|
||||
ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10):
|
||||
optionalDependencies:
|
||||
bufferutil: 4.0.8
|
||||
|
||||
@@ -43,6 +43,7 @@ import {
|
||||
PumpFunTokenOptions,
|
||||
} from "../types";
|
||||
import { BN } from "@coral-xyz/anchor";
|
||||
import { NameAccountAndDomain } from "@onsol/tldparser";
|
||||
|
||||
/**
|
||||
* Main class for interacting with Solana blockchain
|
||||
@@ -211,22 +212,26 @@ export class SolanaAgentKit {
|
||||
);
|
||||
}
|
||||
|
||||
async resolveAllDomains(domain: string): Promise<PublicKey | null> {
|
||||
async resolveAllDomains(domain: string): Promise<PublicKey | undefined> {
|
||||
return resolveAllDomains(this, domain);
|
||||
}
|
||||
|
||||
async getOwnedAllDomains(owner: PublicKey): Promise<string[]> {
|
||||
async getOwnedAllDomains(
|
||||
owner: PublicKey
|
||||
): Promise<NameAccountAndDomain[]> {
|
||||
return getOwnedAllDomains(this, owner);
|
||||
}
|
||||
|
||||
async getOwnedDomainsForTLD(
|
||||
owner: PublicKey,
|
||||
tld: string
|
||||
): Promise<string[]> {
|
||||
return getOwnedDomainsForTLD(this, owner, tld);
|
||||
):Promise<NameAccountAndDomain[]> {
|
||||
return getOwnedDomainsForTLD(this, tld);
|
||||
}
|
||||
|
||||
async getAllDomainsTLDs(): Promise<string[]> {
|
||||
async getAllDomainsTLDs(): Promise<Array<{
|
||||
tld: String;
|
||||
parentAccount: PublicKey;
|
||||
}>> {
|
||||
return getAllDomainsTLDs(this);
|
||||
}
|
||||
|
||||
@@ -242,7 +247,7 @@ export class SolanaAgentKit {
|
||||
marketId: PublicKey,
|
||||
baseAmount: BN,
|
||||
quoteAmount: BN,
|
||||
startTime: BN,
|
||||
startTime: BN
|
||||
): Promise<string> {
|
||||
return raydiumCreateAmmV4(
|
||||
this,
|
||||
@@ -251,8 +256,8 @@ export class SolanaAgentKit {
|
||||
baseAmount,
|
||||
quoteAmount,
|
||||
|
||||
startTime,
|
||||
);
|
||||
startTime
|
||||
);;
|
||||
}
|
||||
|
||||
async raydiumCreateClmm(
|
||||
@@ -260,7 +265,7 @@ export class SolanaAgentKit {
|
||||
mint2: PublicKey,
|
||||
configId: PublicKey,
|
||||
initialPrice: Decimal,
|
||||
startTime: BN,
|
||||
startTime: BN
|
||||
): Promise<string> {
|
||||
return raydiumCreateClmm(
|
||||
this,
|
||||
@@ -278,7 +283,7 @@ export class SolanaAgentKit {
|
||||
configId: PublicKey,
|
||||
mintAAmount: BN,
|
||||
mintBAmount: BN,
|
||||
startTime: BN,
|
||||
startTime: BN
|
||||
): Promise<string> {
|
||||
return raydiumCreateCpmm(
|
||||
this,
|
||||
@@ -287,7 +292,8 @@ export class SolanaAgentKit {
|
||||
configId,
|
||||
mintAAmount,
|
||||
mintBAmount,
|
||||
startTime,
|
||||
|
||||
startTime
|
||||
);
|
||||
}
|
||||
|
||||
@@ -295,7 +301,7 @@ export class SolanaAgentKit {
|
||||
baseMint: PublicKey,
|
||||
quoteMint: PublicKey,
|
||||
lotSize: number = 1,
|
||||
tickSize: number = 0.01,
|
||||
tickSize: number = 0.01
|
||||
): Promise<string[]> {
|
||||
return openbookCreateMarket(
|
||||
this,
|
||||
|
||||
@@ -1040,6 +1040,12 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) {
|
||||
new SolanaOpenbookCreateMarket(solanaKit),
|
||||
new SolanaCreateSingleSidedWhirlpoolTool(solanaKit),
|
||||
new SolanaPythFetchPrice(solanaKit),
|
||||
new SolanaResolveDomain(solanaKit),
|
||||
new SolanaGetOwnedDomains(solanaKit),
|
||||
new SolanaGetOwnedTldDomains(solanaKit),
|
||||
new SolanaGetAllTlds(solanaKit),
|
||||
new SolanaGetAllRegisteredDomains(solanaKit),
|
||||
new SolanaGetMainDomain(solanaKit),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
import {
|
||||
NameRegistryState,
|
||||
getAllDomains,
|
||||
ROOT_DOMAIN_ACCOUNT,
|
||||
} from "@bonfida/spl-name-service";
|
||||
import { Connection, PublicKey } from "@solana/web3.js";
|
||||
import { SolanaAgentKit } from "../index";
|
||||
|
||||
/**
|
||||
* Get all active top-level domains (TLDs) in the Solana name service
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @returns Array of active TLD strings
|
||||
*/
|
||||
export async function getAllDomainsTLDs(
|
||||
agent: SolanaAgentKit
|
||||
): Promise<string[]> {
|
||||
try {
|
||||
// Get the root domain record
|
||||
const rootAccount = await NameRegistryState.retrieve(
|
||||
agent.connection,
|
||||
ROOT_DOMAIN_ACCOUNT
|
||||
);
|
||||
|
||||
if (!rootAccount) {
|
||||
throw new Error("Root domain account not found");
|
||||
}
|
||||
|
||||
// Fetch all TLD records under the root domain
|
||||
const tldAccounts = await agent.connection.getProgramAccounts(
|
||||
new PublicKey("namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX"),
|
||||
{
|
||||
filters: [
|
||||
{
|
||||
memcmp: {
|
||||
offset: 0,
|
||||
bytes: rootAccount.registry.owner.toBase58(),
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
|
||||
// Parse the TLD names from the accounts
|
||||
const tlds: string[] = [];
|
||||
for (const account of tldAccounts) {
|
||||
const registry = await NameRegistryState.retrieve(
|
||||
agent.connection,
|
||||
account.pubkey
|
||||
);
|
||||
|
||||
if (registry && registry.registry.data) {
|
||||
const tldName = Buffer.from(registry.registry.data)
|
||||
.toString()
|
||||
.replace(/\0/g, "");
|
||||
if (tldName) {
|
||||
tlds.push(tldName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tlds;
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch TLDs: ${error.message}`);
|
||||
}
|
||||
}
|
||||
21
src/tools/get_all_domains_tlds.ts
Normal file
21
src/tools/get_all_domains_tlds.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Connection, PublicKey } from "@solana/web3.js";
|
||||
import { SolanaAgentKit } from "../index";
|
||||
import { getAllTld } from "@onsol/tldparser";
|
||||
|
||||
/**
|
||||
* Get all active top-level domains (TLDs) in the Solana name service
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @returns Array of active TLD strings
|
||||
*/
|
||||
export async function getAllDomainsTLDs(
|
||||
agent: SolanaAgentKit
|
||||
): Promise<Array<{
|
||||
tld: String;
|
||||
parentAccount: PublicKey;
|
||||
}>> {
|
||||
try {
|
||||
return getAllTld(agent.connection)
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch TLDs: ${error.message}`);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getAllDomains } from "@bonfida/spl-name-service";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { getAllDomainsTLDs } from "./get_all_active_tlds";
|
||||
import { getAllDomainsTLDs } from "./get_all_domains_tlds";
|
||||
|
||||
/**
|
||||
* Get all registered domains across all TLDs
|
||||
@@ -20,7 +20,7 @@ export async function getAllRegisteredAllDomains(
|
||||
for (const tld of tlds) {
|
||||
const domains = await getAllDomains(
|
||||
agent.connection,
|
||||
new PublicKey("namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX"),
|
||||
new PublicKey("namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX")
|
||||
);
|
||||
|
||||
// Add domains with TLD suffix
|
||||
|
||||
@@ -6,16 +6,19 @@ import { PublicKey } from "@solana/web3.js";
|
||||
* Get the user's main/favorite domain for a SolanaAgentKit instance
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @param owner Owner's public key
|
||||
* @returns Promise resolving to the main domain name or null if not set
|
||||
* @returns Promise resolving to the main domain name or null if not found
|
||||
*/
|
||||
export async function getMainAllDomainsDomain(
|
||||
agent: any,
|
||||
owner: PublicKey
|
||||
): Promise<string | null> {
|
||||
let mainDomain = null;
|
||||
try {
|
||||
const favDomain = await _getFavoriteDomain(agent.connection, owner);
|
||||
return favDomain.stale ? null : favDomain.reverse;
|
||||
mainDomain = await _getFavoriteDomain(agent.connection, owner);
|
||||
return mainDomain.stale ? null : mainDomain.reverse;
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch main domain: ${error.message}`);
|
||||
console.log("No main/favorite domain found");
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
20
src/tools/get_owned_all_domains.ts
Normal file
20
src/tools/get_owned_all_domains.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { NameAccountAndDomain, TldParser } from "@onsol/tldparser";
|
||||
|
||||
/**
|
||||
* Get all domains owned domains for a specific TLD for the agent's wallet
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @param owner - PublicKey of the owner
|
||||
* @returns Promise resolving to an array of owned domains or an empty array if none are found
|
||||
*/
|
||||
export async function getOwnedAllDomains(
|
||||
agent: SolanaAgentKit,
|
||||
owner:PublicKey
|
||||
): Promise<NameAccountAndDomain[]> {
|
||||
try {
|
||||
return new TldParser(agent.connection).getParsedAllUserDomains(owner);
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch owned domains: ${error.message}`);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,25 @@
|
||||
import { NameAccountAndDomain, TldParser } from "@onsol/tldparser";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { getOwnedAllDomains } from "./lookup_owner";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
/**
|
||||
* Get all domains owned by an address for a specific TLD
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @param owner Owner's public key
|
||||
* @param tld Top-level domain (e.g., "sol")
|
||||
* @returns Array of owned domain names for the specified TLD
|
||||
* @returns Promise resolving to an array of owned domain names for the specified TLD or an empty array if none are found
|
||||
*/
|
||||
export async function getOwnedDomainsForTLD(
|
||||
agent: SolanaAgentKit,
|
||||
owner: PublicKey,
|
||||
tld: string
|
||||
): Promise<string[]> {
|
||||
): Promise<NameAccountAndDomain[]> {
|
||||
try {
|
||||
const allDomains = await getOwnedAllDomains(agent, owner);
|
||||
return allDomains.filter(domain => domain.endsWith(`.${tld}`));
|
||||
return new TldParser(agent.connection)
|
||||
.getParsedAllUserDomainsFromTld(
|
||||
agent.wallet_address,
|
||||
tld
|
||||
)
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch domains for TLD: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ export * from "./stake_with_jup";
|
||||
export * from "./fetch_price";
|
||||
export * from "./send_compressed_airdrop";
|
||||
export * from "./create_orca_single_sided_whirlpool";
|
||||
export * from "./get_all_active_tlds";
|
||||
export * from "./get_all_domains_tlds";
|
||||
export * from "./get_all_registered_all_domains";
|
||||
export * from "./get_domains_on_tld";
|
||||
export * from "./get_main_domain";
|
||||
export * from "./lookup_owner";
|
||||
export * from "./get_owned_domains_for_tld";
|
||||
export * from "./get_main_all_domains_domain";
|
||||
export * from "./get_owned_all_domains";
|
||||
export * from "./resolve_domain";
|
||||
|
||||
export * from "./raydium_create_ammV4";
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import { getAllDomains } from "@bonfida/spl-name-service";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
/**
|
||||
* Get all domains owned by a specific address
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @param owner Owner's public key
|
||||
* @returns Array of owned domain names
|
||||
*/
|
||||
export async function getOwnedAllDomains(
|
||||
agent: SolanaAgentKit,
|
||||
owner: PublicKey
|
||||
): Promise<string[]> {
|
||||
try {
|
||||
const domains = await getAllDomains(agent.connection, owner);
|
||||
return domains.map(domain => domain.toString());
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch owned domains: ${error.message}`);
|
||||
}
|
||||
}
|
||||
@@ -1,42 +1,22 @@
|
||||
import { Buffer } from "buffer";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import {
|
||||
getNameAccountKeySync,
|
||||
NAME_PROGRAM_ID,
|
||||
} from "@bonfida/spl-name-service";
|
||||
import { TldParser } from "@onsol/tldparser";
|
||||
import { SolanaAgentKit } from "../index";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
/**
|
||||
* Resolve a domain to its public key
|
||||
* Resolve all domains for a given agent and domain
|
||||
* @param agent SolanaAgentKit instance
|
||||
* @param domain Domain name to resolve
|
||||
* @returns Associated public key or null if not found
|
||||
* @returns Promise resolving to the domain or undefined if not found
|
||||
*/
|
||||
export async function resolveAllDomains(
|
||||
agent: SolanaAgentKit,
|
||||
domain: string
|
||||
): Promise<PublicKey | null> {
|
||||
): Promise<PublicKey | undefined> {
|
||||
try {
|
||||
// Convert domain name to buffer for hashing
|
||||
const hashedDomain = Buffer.from(domain);
|
||||
|
||||
// Get the name account key using the new sync method
|
||||
const nameAccountKey = getNameAccountKeySync(
|
||||
hashedDomain,
|
||||
undefined, // nameClass
|
||||
undefined // nameParent
|
||||
);
|
||||
|
||||
// Get the account info to retrieve the owner
|
||||
const owner = await agent.connection.getAccountInfo(nameAccountKey);
|
||||
|
||||
if (!owner) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// The owner's public key is stored in the data buffer starting at offset 32
|
||||
return new PublicKey(owner.data.slice(32, 64));
|
||||
let tld = new TldParser(agent.connection).getOwnerFromDomainTld(domain)
|
||||
return tld;
|
||||
} catch (error: any) {
|
||||
throw new Error(`Domain resolution failed: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
146
test/domain_methods.test.ts
Normal file
146
test/domain_methods.test.ts
Normal file
@@ -0,0 +1,146 @@
|
||||
|
||||
import { SolanaAgentKit } from "../src";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import * as dotenv from "dotenv";
|
||||
import { expect } from "chai";
|
||||
import { before, describe, it } from "node:test";
|
||||
import { TldParser } from "@onsol/tldparser";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
describe("Solana Domain Methods Tests", () => {
|
||||
let agent: SolanaAgentKit;
|
||||
|
||||
before(() => {
|
||||
// Initialize the agent before running tests
|
||||
if (
|
||||
!process.env.SOLANA_PRIVATE_KEY ||
|
||||
!process.env.RPC_URL ||
|
||||
!process.env.OPENAI_API_KEY
|
||||
) {
|
||||
throw new Error("Required environment variables are not set");
|
||||
}
|
||||
|
||||
agent = new SolanaAgentKit(
|
||||
process.env.SOLANA_PRIVATE_KEY,
|
||||
process.env.RPC_URL,
|
||||
process.env.OPENAI_API_KEY
|
||||
);
|
||||
});
|
||||
|
||||
describe("resolveAllDomains", () => {
|
||||
it("should resolve a valid domain to a public key", async () => {
|
||||
const testDomain = "hero.sol";
|
||||
const result = await agent.resolveAllDomains(testDomain);
|
||||
expect(result).to.be.instanceof(PublicKey);
|
||||
});
|
||||
it("should perform fetching of an owner an nft domain", async () => {
|
||||
const parser = new TldParser(agent.connection);
|
||||
const domanTld = "miester.sol";
|
||||
const ownerReceived = await parser.getOwnerFromDomainTld(domanTld);
|
||||
const owner = new PublicKey(
|
||||
"2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67"
|
||||
);
|
||||
expect(ownerReceived).to.be(owner.toString());
|
||||
});
|
||||
it("should return null for non-existent domain", async () => {
|
||||
const nonExistentDomain = "nonexistent123456789.sol";
|
||||
const result = await agent.resolveAllDomains(nonExistentDomain);
|
||||
expect(result).to.be.null;
|
||||
});
|
||||
|
||||
it("should handle invalid domain format", async () => {
|
||||
const invalidDomain = "";
|
||||
try {
|
||||
await agent.resolveAllDomains(invalidDomain);
|
||||
expect.fail("Should have thrown an error");
|
||||
} catch (error) {
|
||||
expect(error).to.be.instanceof(Error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("getOwnedAllDomains", () => {
|
||||
it("should return array of domains for an owner", async () => {
|
||||
const owner = new PublicKey(
|
||||
"2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67"
|
||||
);
|
||||
const domains = await agent.getOwnedAllDomains(owner);
|
||||
expect(domains).to.be.an("array").that.includes("miester.sol");
|
||||
domains.forEach((domain) => {
|
||||
expect(domain).to.be.a("string");
|
||||
});
|
||||
});
|
||||
it("should return array of domains for an owner", async () => {
|
||||
const owner = new PublicKey(agent.wallet_address);
|
||||
const domains = await agent.getOwnedAllDomains(owner);
|
||||
expect(domains).to.be.an("array");
|
||||
domains.forEach((domain) => {
|
||||
expect(domain).to.be.a("string");
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle owner with no domains", async () => {
|
||||
// Create a new random public key that likely owns no domains
|
||||
const emptyOwner = PublicKey.unique();
|
||||
const domains = await agent.getOwnedAllDomains(emptyOwner);
|
||||
expect(domains).to.be.an("array");
|
||||
expect(domains).to.have.lengthOf(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("getOwnedDomainsForTLD", () => {
|
||||
it("should return domains for specific TLD", async () => {
|
||||
const tld = "sol";
|
||||
const domains = await agent.getOwnedDomainsForTLD(tld);
|
||||
expect(domains).to.be.an("array");
|
||||
domains.forEach((domain) => {
|
||||
console.log(`these are the domains ${domain.domain}`)
|
||||
});
|
||||
});
|
||||
|
||||
it("should return empty array for non-existent TLD", async () => {
|
||||
const nonExistentTLD = "nonexistent";
|
||||
const domains = await agent.getOwnedDomainsForTLD(nonExistentTLD);
|
||||
expect(domains).to.be.an("array");
|
||||
expect(domains).to.have.lengthOf(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("getAllDomainsTLDs", () => {
|
||||
it("should return array of TLDs", async () => {
|
||||
const tlds = await agent.getAllDomainsTLDs();
|
||||
expect(tlds).to.be.an("array");
|
||||
});
|
||||
});
|
||||
|
||||
describe("getAllRegisteredAllDomains", () => {
|
||||
it("should return array of all registered domains", async () => {
|
||||
const domains = await agent.getAllRegisteredAllDomains();
|
||||
expect(domains).to.be.an("array");
|
||||
domains.forEach((domain) => {
|
||||
expect(domain).to.be.a("string");
|
||||
expect(domain).to.include(".");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("getMainAllDomainsDomain", () => {
|
||||
it("should return main domain or null for an owner", async () => {
|
||||
const owner = new PublicKey(
|
||||
"2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67"
|
||||
);
|
||||
const mainDomain = await agent.getMainAllDomainsDomain(owner);
|
||||
expect(mainDomain).to.satisfy((domain: string | null) => {
|
||||
return domain === null || typeof domain === "string";
|
||||
});
|
||||
});
|
||||
|
||||
it("should return null for address without main domain", async () => {
|
||||
const emptyOwner = PublicKey.unique();
|
||||
const mainDomain = await agent.getMainAllDomainsDomain(emptyOwner);
|
||||
expect(mainDomain).to.be.null;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user