|
5 | 5 | import { bcs } from '@iota/iota-sdk/bcs'; |
6 | 6 | import { IotaGraphQLClient } from '@iota/iota-sdk/graphql'; |
7 | 7 | import { graphql } from '@iota/iota-sdk/graphql/schemas/2025.2'; |
8 | | -import { fromB64, toB64 } from '@iota/iota-sdk/utils'; |
| 8 | +import { fromBase64, toBase64 } from '@iota/iota-sdk/utils'; |
9 | 9 | import { blake2b } from '@noble/hashes/blake2b'; |
10 | 10 | import { bytesToHex, hexToBytes } from '@noble/hashes/utils'; |
11 | 11 |
|
@@ -89,7 +89,7 @@ export class IotaNamesClient { |
89 | 89 | const iotaNamesObjectId = this.getPackage('iotaNamesObjectId', 'v1'); |
90 | 90 | const packageId = this.getPackage('packageId', 'v1'); |
91 | 91 |
|
92 | | - const coreConfigBcsB64 = toB64( |
| 92 | + const coreConfigBcsB64 = toBase64( |
93 | 93 | DummyFieldBcs.serialize({ |
94 | 94 | dummy_field: false, |
95 | 95 | }).toBytes(), |
@@ -136,7 +136,7 @@ export class IotaNamesClient { |
136 | 136 | const packageId = this.getPackage('packageId', 'v1'); |
137 | 137 | const subnamesPackageId = this.getPackage('subnamesPackageId', 'v1'); |
138 | 138 |
|
139 | | - const subnamesConfigBcsB64 = toB64( |
| 139 | + const subnamesConfigBcsB64 = toBase64( |
140 | 140 | DummyFieldBcs.serialize({ |
141 | 141 | dummy_field: false, |
142 | 142 | }).toBytes(), |
@@ -187,7 +187,7 @@ export class IotaNamesClient { |
187 | 187 | const iotaNamesObjectId = this.getPackage('iotaNamesObjectId', 'v1'); |
188 | 188 | const packageId = this.getPackage('packageId', 'v1'); |
189 | 189 |
|
190 | | - const pricingConfigBcsB64 = toB64( |
| 190 | + const pricingConfigBcsB64 = toBase64( |
191 | 191 | DummyFieldBcs.serialize({ |
192 | 192 | dummy_field: false, |
193 | 193 | }).toBytes(), |
@@ -250,7 +250,7 @@ export class IotaNamesClient { |
250 | 250 | const iotaNamesObjectId = this.getPackage('iotaNamesObjectId', 'v1'); |
251 | 251 | const packageId = this.getPackage('packageId', 'v1'); |
252 | 252 |
|
253 | | - const pricingConfigBcsB64 = toB64( |
| 253 | + const pricingConfigBcsB64 = toBase64( |
254 | 254 | DummyFieldBcs.serialize({ |
255 | 255 | dummy_field: false, |
256 | 256 | }).toBytes(), |
@@ -326,7 +326,7 @@ export class IotaNamesClient { |
326 | 326 | const iotaNamesObjectId = this.getPackage('iotaNamesObjectId', 'v1'); |
327 | 327 | const packageId = this.getPackage('packageId', 'v1'); |
328 | 328 |
|
329 | | - const denyListBcsB64 = toB64( |
| 329 | + const denyListBcsB64 = toBase64( |
330 | 330 | DummyFieldBcs.serialize({ |
331 | 331 | dummy_field: false, |
332 | 332 | }).toBytes(), |
@@ -436,7 +436,7 @@ export class IotaNamesClient { |
436 | 436 | const registryTableId = this.getPackage('registryTableId', 'v1'); |
437 | 437 | const packageId = this.getPackage('packageId', 'v1'); |
438 | 438 |
|
439 | | - const nameBcsB64 = toB64( |
| 439 | + const nameBcsB64 = toBase64( |
440 | 440 | NameBcs.serialize({ |
441 | 441 | labels: normalizeIotaName(name, 'dot').split('.').reverse(), |
442 | 442 | }).toBytes(), |
@@ -538,7 +538,7 @@ export class IotaNamesClient { |
538 | 538 | throw new Error('Coupon house not found or is invalid'); |
539 | 539 | } |
540 | 540 |
|
541 | | - return CouponHouseBcs.parse(fromB64(couponsHouseDynamicFieldBcsValue)); |
| 541 | + return CouponHouseBcs.parse(fromBase64(couponsHouseDynamicFieldBcsValue)); |
542 | 542 | } |
543 | 543 |
|
544 | 544 | async resolveCoupon(couponCode: string): Promise<Coupon | null> { |
@@ -585,7 +585,7 @@ export class IotaNamesClient { |
585 | 585 | return null; |
586 | 586 | } |
587 | 587 |
|
588 | | - const couponData = CouponBcs.parse(fromB64(couponBcsBase64)); |
| 588 | + const couponData = CouponBcs.parse(fromBase64(couponBcsBase64)); |
589 | 589 |
|
590 | 590 | return { ...couponData, couponCode }; |
591 | 591 | } |
|
0 commit comments