stacksagent 1.3.0 → 1.3.1

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.
@@ -10,7 +10,7 @@ id,language,category,name,description,code,imports_or_contract,notes
10
10
  9,clarity,bulk,batch-register,"Register multiple names","(map register-single-name names)","Custom contract","Loop through list of names"
11
11
  10,clarity,renew,renew-name,"Renew name registration","(contract-call? .bns-v2 name-renewal namespace name)","BNS-V2 contract","Extends lease period"
12
12
  11,javascript,resolve,address-to-name,"Get primary BNS name for address using SDK","const primaryName = await getPrimaryName({ address: 'SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQ9H6DPR' network: 'mainnet' }); if (primaryName) { const fullName = `${primaryName.name}.${primaryName.namespace}`; console.log(fullName) }","import { getPrimaryName } from 'bns-v2-sdk'","Returns { name namespace } or null; SDK method for resolving address to BNS"
13
- 12,api,resolve,name-to-address,"Resolve BNS name to owner address using API","async function fetchAddressByBNS(bns) { try { const url = `https://api.bnsv2.com/names/${bns.toLowerCase()}`; const response = await axios.get(url); return response.data?.data?.owner || null } catch (error) { console.error('BNS resolution failed:' error); return null }}","import axios from 'axios'","REST API method; faster than SDK for name-to-address resolution; returns owner address"
13
+ 12,javascript,resolve,name-to-address,"Resolve BNS name to owner address using SDK","const nameInfo = await getNameInfo({ fullyQualifiedName: 'example.btc' network: 'mainnet' }); const ownerAddress = nameInfo?.owner || null; console.log('Owner:' ownerAddress)","import { getNameInfo } from 'bns-v2-sdk'","Returns owner address from BNS name; use getNameInfo for full name details"
14
14
  13,javascript,lookup,get-name-info,"Get detailed information about a BNS name","const nameInfo = await getNameInfo({ fullyQualifiedName: 'example.btc' network: 'mainnet' }); console.log(nameInfo.owner nameInfo.zonefile)","import { getNameInfo } from 'bns-v2-sdk'","Returns name owner zonefile lease-ending-at and other metadata"
15
15
  14,javascript,lookup,get-token-id,"Get token ID from BNS fully qualified name","const nameId = await getIdFromBns({ fullyQualifiedName: 'example.btc' network: 'mainnet' }); console.log('Token ID:' nameId)","import { getIdFromBns } from 'bns-v2-sdk'","Required for marketplace operations (buy list unlist); returns BigInt token ID"
16
16
  15,javascript,marketplace,buy-name,"Build transaction to buy BNS from marketplace","const buyPayload = await buildBuyInUstxTx({ id: nameId expectedPrice: BigInt(priceInMicroStx) commissionTraitAddress: 'SP...' commissionTraitName: 'commission-trait' senderAddress: userAddress network: 'mainnet' }); await request('stx_callContract' { contract: `${buyPayload.contractAddress}.${buyPayload.contractName}` functionName: buyPayload.functionName functionArgs: buyPayload.functionArgs postConditions: buyPayload.postConditions postConditionMode: 'deny' network: 'mainnet' })","import { buildBuyInUstxTx } from 'bns-v2-sdk'; import { request } from '@stacks/connect'","Price includes 2% marketplace fee; expectedPrice = listedPrice * 1.02; use deny mode for security"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stacksagent",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "AI Skill for building Stacks blockchain applications - CLI installer",
5
5
  "bin": {
6
6
  "stacksagent": "./dist/index.js"