Skip to content

Commit

Permalink
feat: Add more fields to RgbppApiXudtAssetInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
duanyytop committed Jan 16, 2025
1 parent be91a0b commit 76c4711
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/rgbpp/xudt/compatible-xudt/assets-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,22 @@ import { btcService } from '../../env';
}),
);
console.log('Standard xUDT info: ', JSON.stringify(info));

const rusdInfo = await btcService.getRgbppAssetInfoByTypeScript(
serializeScript({
codeHash: '0x1142755a044bf2ee358cba9f2da187ce928c91cd4dc8692ded0337efa677d21a',
hashType: 'type',
args: '0x878fcc6f1f08d48e87bb1c3b3d5083f23f8a39c5d5c764f253b55b998526439b',
}),
);
console.log('RUSD xUDT info: ', JSON.stringify(rusdInfo));

const utxoAirdropInfo = await btcService.getRgbppAssetInfoByTypeScript(
serializeScript({
codeHash: '0xf5da9003e31fa9301a3915fe304de9bdb80524b5f0d8fc325fb699317998ee7a',
hashType: 'type',
args: '0xa63d308c04b4c075eb1d7d5cac891cf20276e3ddb2ec855fc981c88d8134dbe2',
}),
);
console.log('UTXO Airdrop xUDT info: ', JSON.stringify(utxoAirdropInfo));
})();
4 changes: 4 additions & 0 deletions packages/service/src/types/rgbpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export interface RgbppApiXudtAssetInfo {
symbol: string;
name: string;
decimal: number;
total_supply?: string;
issuer?: string;
circulating_supply?: string;
token_info_cell_type_hash?: string;
}

export interface RgbppApiSporeAssetInfo {
Expand Down

0 comments on commit 76c4711

Please sign in to comment.