@digitalworld/digital-world-sdk 16.0.0 → 16.0.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.
Files changed (166) hide show
  1. package/README.md +5 -5
  2. package/dist/digital-world-sdk-axios.js +52 -47
  3. package/dist/digital-world-sdk-axios.js.map +1 -1
  4. package/dist/digital-world-sdk-axios.min.js +1 -1
  5. package/dist/digital-world-sdk-axios.min.js.map +1 -1
  6. package/dist/digital-world-sdk.js +52 -47
  7. package/dist/digital-world-sdk.js.map +1 -1
  8. package/dist/digital-world-sdk.min.js +6 -6
  9. package/dist/digital-world-sdk.min.js.map +1 -1
  10. package/lib/axios/cjs/base/contract.js +2 -2
  11. package/lib/axios/cjs/base/contract.js.map +1 -1
  12. package/lib/axios/cjs/base/invocation.js.map +1 -1
  13. package/lib/axios/cjs/base/numbers/sc_int.js +1 -1
  14. package/lib/axios/cjs/base/numbers/sc_int.js.map +1 -1
  15. package/lib/axios/cjs/base/operation.js +1 -1
  16. package/lib/axios/cjs/base/operation.js.map +1 -1
  17. package/lib/axios/cjs/base/operations/invoke_host_function.js +2 -2
  18. package/lib/axios/cjs/base/operations/invoke_host_function.js.map +1 -1
  19. package/lib/axios/cjs/base/operations/revoke_sponsorship.js.map +1 -1
  20. package/lib/axios/cjs/bindings/config.js +4 -4
  21. package/lib/axios/cjs/bindings/config.js.map +1 -1
  22. package/lib/axios/cjs/bindings/generator.js +4 -4
  23. package/lib/axios/cjs/bindings/generator.js.map +1 -1
  24. package/lib/axios/cjs/bindings/types.js.map +1 -1
  25. package/lib/axios/cjs/bindings/utils.js +2 -2
  26. package/lib/axios/cjs/bindings/utils.js.map +1 -1
  27. package/lib/axios/cjs/bindings/wasm_fetcher.js +2 -2
  28. package/lib/axios/cjs/bindings/wasm_fetcher.js.map +1 -1
  29. package/lib/axios/cjs/contract/assembled_transaction.js.map +1 -1
  30. package/lib/axios/cjs/contract/spec.js +1 -1
  31. package/lib/axios/cjs/contract/spec.js.map +1 -1
  32. package/lib/axios/cjs/contract/types.js.map +1 -1
  33. package/lib/axios/cjs/gateway/gateway_axios_client.js +1 -1
  34. package/lib/axios/cjs/gateway/server_api.js.map +1 -1
  35. package/lib/axios/cjs/rpc/api.js.map +1 -1
  36. package/lib/axios/cjs/rpc/axios.js +1 -1
  37. package/lib/axios/cjs/rpc/server.js +32 -27
  38. package/lib/axios/cjs/rpc/server.js.map +1 -1
  39. package/lib/axios/cjs/webauth/utils.js.map +1 -1
  40. package/lib/axios/esm/base/contract.d.ts +4 -4
  41. package/lib/axios/esm/base/contract.js +2 -2
  42. package/lib/axios/esm/base/contract.js.map +1 -1
  43. package/lib/axios/esm/base/invocation.d.ts +2 -2
  44. package/lib/axios/esm/base/invocation.js.map +1 -1
  45. package/lib/axios/esm/base/numbers/sc_int.d.ts +2 -2
  46. package/lib/axios/esm/base/numbers/sc_int.js +1 -1
  47. package/lib/axios/esm/base/numbers/sc_int.js.map +1 -1
  48. package/lib/axios/esm/base/operation.d.ts +2 -2
  49. package/lib/axios/esm/base/operation.js +2 -2
  50. package/lib/axios/esm/base/operation.js.map +1 -1
  51. package/lib/axios/esm/base/operations/index.d.ts +1 -1
  52. package/lib/axios/esm/base/operations/invoke_host_function.d.ts +5 -5
  53. package/lib/axios/esm/base/operations/invoke_host_function.js +2 -2
  54. package/lib/axios/esm/base/operations/invoke_host_function.js.map +1 -1
  55. package/lib/axios/esm/base/operations/revoke_sponsorship.d.ts +1 -1
  56. package/lib/axios/esm/base/operations/revoke_sponsorship.js.map +1 -1
  57. package/lib/axios/esm/base/operations/types.d.ts +2 -2
  58. package/lib/axios/esm/bindings/config.js +4 -4
  59. package/lib/axios/esm/bindings/config.js.map +1 -1
  60. package/lib/axios/esm/bindings/generator.d.ts +7 -7
  61. package/lib/axios/esm/bindings/generator.js +4 -4
  62. package/lib/axios/esm/bindings/generator.js.map +1 -1
  63. package/lib/axios/esm/bindings/types.d.ts +1 -1
  64. package/lib/axios/esm/bindings/types.js.map +1 -1
  65. package/lib/axios/esm/bindings/utils.d.ts +4 -4
  66. package/lib/axios/esm/bindings/utils.js +2 -2
  67. package/lib/axios/esm/bindings/utils.js.map +1 -1
  68. package/lib/axios/esm/bindings/wasm_fetcher.js +2 -2
  69. package/lib/axios/esm/bindings/wasm_fetcher.js.map +1 -1
  70. package/lib/axios/esm/contract/assembled_transaction.d.ts +1 -1
  71. package/lib/axios/esm/contract/assembled_transaction.js.map +1 -1
  72. package/lib/axios/esm/contract/spec.js +1 -1
  73. package/lib/axios/esm/contract/spec.js.map +1 -1
  74. package/lib/axios/esm/contract/types.d.ts +2 -2
  75. package/lib/axios/esm/contract/types.js.map +1 -1
  76. package/lib/axios/esm/gateway/gateway_axios_client.js +1 -1
  77. package/lib/axios/esm/gateway/server_api.d.ts +2 -2
  78. package/lib/axios/esm/gateway/server_api.js.map +1 -1
  79. package/lib/axios/esm/rpc/api.d.ts +1 -1
  80. package/lib/axios/esm/rpc/api.js.map +1 -1
  81. package/lib/axios/esm/rpc/axios.js +1 -1
  82. package/lib/axios/esm/rpc/browser.d.ts +1 -1
  83. package/lib/axios/esm/rpc/server.d.ts +26 -26
  84. package/lib/axios/esm/rpc/server.js +32 -27
  85. package/lib/axios/esm/rpc/server.js.map +1 -1
  86. package/lib/axios/esm/webauth/utils.d.ts +2 -2
  87. package/lib/axios/esm/webauth/utils.js.map +1 -1
  88. package/lib/cjs/base/contract.js +2 -2
  89. package/lib/cjs/base/contract.js.map +1 -1
  90. package/lib/cjs/base/invocation.js.map +1 -1
  91. package/lib/cjs/base/numbers/sc_int.js +1 -1
  92. package/lib/cjs/base/numbers/sc_int.js.map +1 -1
  93. package/lib/cjs/base/operation.js +1 -1
  94. package/lib/cjs/base/operation.js.map +1 -1
  95. package/lib/cjs/base/operations/invoke_host_function.js +2 -2
  96. package/lib/cjs/base/operations/invoke_host_function.js.map +1 -1
  97. package/lib/cjs/base/operations/revoke_sponsorship.js.map +1 -1
  98. package/lib/cjs/bindings/config.js +4 -4
  99. package/lib/cjs/bindings/config.js.map +1 -1
  100. package/lib/cjs/bindings/generator.js +4 -4
  101. package/lib/cjs/bindings/generator.js.map +1 -1
  102. package/lib/cjs/bindings/types.js.map +1 -1
  103. package/lib/cjs/bindings/utils.js +2 -2
  104. package/lib/cjs/bindings/utils.js.map +1 -1
  105. package/lib/cjs/bindings/wasm_fetcher.js +2 -2
  106. package/lib/cjs/bindings/wasm_fetcher.js.map +1 -1
  107. package/lib/cjs/contract/assembled_transaction.js.map +1 -1
  108. package/lib/cjs/contract/spec.js +1 -1
  109. package/lib/cjs/contract/spec.js.map +1 -1
  110. package/lib/cjs/contract/types.js.map +1 -1
  111. package/lib/cjs/gateway/gateway_axios_client.js +1 -1
  112. package/lib/cjs/gateway/server_api.js.map +1 -1
  113. package/lib/cjs/rpc/api.js.map +1 -1
  114. package/lib/cjs/rpc/axios.js +1 -1
  115. package/lib/cjs/rpc/server.js +32 -27
  116. package/lib/cjs/rpc/server.js.map +1 -1
  117. package/lib/cjs/webauth/utils.js.map +1 -1
  118. package/lib/esm/base/contract.d.ts +4 -4
  119. package/lib/esm/base/contract.js +2 -2
  120. package/lib/esm/base/contract.js.map +1 -1
  121. package/lib/esm/base/invocation.d.ts +2 -2
  122. package/lib/esm/base/invocation.js.map +1 -1
  123. package/lib/esm/base/numbers/sc_int.d.ts +2 -2
  124. package/lib/esm/base/numbers/sc_int.js +1 -1
  125. package/lib/esm/base/numbers/sc_int.js.map +1 -1
  126. package/lib/esm/base/operation.d.ts +2 -2
  127. package/lib/esm/base/operation.js +2 -2
  128. package/lib/esm/base/operation.js.map +1 -1
  129. package/lib/esm/base/operations/index.d.ts +1 -1
  130. package/lib/esm/base/operations/invoke_host_function.d.ts +5 -5
  131. package/lib/esm/base/operations/invoke_host_function.js +2 -2
  132. package/lib/esm/base/operations/invoke_host_function.js.map +1 -1
  133. package/lib/esm/base/operations/revoke_sponsorship.d.ts +1 -1
  134. package/lib/esm/base/operations/revoke_sponsorship.js.map +1 -1
  135. package/lib/esm/base/operations/types.d.ts +2 -2
  136. package/lib/esm/bindings/config.js +4 -4
  137. package/lib/esm/bindings/config.js.map +1 -1
  138. package/lib/esm/bindings/generator.d.ts +7 -7
  139. package/lib/esm/bindings/generator.js +4 -4
  140. package/lib/esm/bindings/generator.js.map +1 -1
  141. package/lib/esm/bindings/types.d.ts +1 -1
  142. package/lib/esm/bindings/types.js.map +1 -1
  143. package/lib/esm/bindings/utils.d.ts +4 -4
  144. package/lib/esm/bindings/utils.js +2 -2
  145. package/lib/esm/bindings/utils.js.map +1 -1
  146. package/lib/esm/bindings/wasm_fetcher.js +2 -2
  147. package/lib/esm/bindings/wasm_fetcher.js.map +1 -1
  148. package/lib/esm/contract/assembled_transaction.d.ts +1 -1
  149. package/lib/esm/contract/assembled_transaction.js.map +1 -1
  150. package/lib/esm/contract/spec.js +1 -1
  151. package/lib/esm/contract/spec.js.map +1 -1
  152. package/lib/esm/contract/types.d.ts +2 -2
  153. package/lib/esm/contract/types.js.map +1 -1
  154. package/lib/esm/gateway/gateway_axios_client.js +1 -1
  155. package/lib/esm/gateway/server_api.d.ts +2 -2
  156. package/lib/esm/gateway/server_api.js.map +1 -1
  157. package/lib/esm/rpc/api.d.ts +1 -1
  158. package/lib/esm/rpc/api.js.map +1 -1
  159. package/lib/esm/rpc/axios.js +1 -1
  160. package/lib/esm/rpc/browser.d.ts +1 -1
  161. package/lib/esm/rpc/server.d.ts +26 -26
  162. package/lib/esm/rpc/server.js +32 -27
  163. package/lib/esm/rpc/server.js.map +1 -1
  164. package/lib/esm/webauth/utils.d.ts +2 -2
  165. package/lib/esm/webauth/utils.js.map +1 -1
  166. package/package.json +41 -39
@@ -16082,7 +16082,7 @@
16082
16082
  ...opts.auth !== void 0 && { auth: opts.auth }
16083
16083
  });
16084
16084
  }
16085
- function createStellarAssetContract(opts) {
16085
+ function createDigitalWorldAssetContract(opts) {
16086
16086
  let asset = opts.asset;
16087
16087
  if (typeof asset === "string") {
16088
16088
  const parts = asset.split(":");
@@ -16460,7 +16460,7 @@
16460
16460
  static restoreFootprint = restoreFootprint;
16461
16461
  // These are not `xdr.Operation`s directly, but proxies for common
16462
16462
  // versions of `Operation.invokeHostFunction`
16463
- static createStellarAssetContract = createStellarAssetContract;
16463
+ static createDigitalWorldAssetContract = createDigitalWorldAssetContract;
16464
16464
  static invokeContractFunction = invokeContractFunction;
16465
16465
  static createCustomContract = createCustomContract;
16466
16466
  static uploadContractWasm = uploadContractWasm;
@@ -17531,7 +17531,7 @@
17531
17531
  }
17532
17532
  }
17533
17533
  /**
17534
- * Returns Stellar contract ID as a strkey, ex.
17534
+ * Returns Digital World contract ID as a strkey, ex.
17535
17535
  * `CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE`.
17536
17536
  */
17537
17537
  contractId() {
@@ -17554,7 +17554,7 @@
17554
17554
  * @see Operation.invokeHostFunction
17555
17555
  * @see Operation.invokeContractFunction
17556
17556
  * @see Operation.createCustomContract
17557
- * @see Operation.createStellarAssetContract
17557
+ * @see Operation.createDigitalWorldAssetContract
17558
17558
  * @see Operation.uploadContractWasm
17559
17559
  */
17560
17560
  call(method, ...params) {
@@ -17916,7 +17916,7 @@
17916
17916
  class ScInt extends XdrLargeInt {
17917
17917
  /**
17918
17918
  * @param value - a single, integer-like value which will
17919
- * be interpreted in the smallest appropriate XDR type supported by Stellar
17919
+ * be interpreted in the smallest appropriate XDR type supported by Digital World
17920
17920
  * (64, 128, or 256 bit integer values). signed values are supported, though
17921
17921
  * they are sanity-checked against `opts.type`. if you need 32-bit values,
17922
17922
  * you can construct them directly without needing this wrapper, e.g.
@@ -20886,7 +20886,7 @@ ${value}`, dataLines++;
20886
20886
  return doc && typeof doc == "object" && "baseURI" in doc && typeof doc.baseURI == "string" ? doc.baseURI : void 0;
20887
20887
  }
20888
20888
 
20889
- const version$1 = "16.0.0";
20889
+ const version$1 = "16.0.1";
20890
20890
  const SERVER_TIME_MAP = {};
20891
20891
  function toSeconds(ms) {
20892
20892
  return Math.floor(ms / 1e3);
@@ -22813,7 +22813,7 @@ ${value}`, dataLines++;
22813
22813
  Api2.isSimulationRaw = isSimulationRaw;
22814
22814
  })(Api || (Api = {}));
22815
22815
 
22816
- const version = "16.0.0";
22816
+ const version = "16.0.1";
22817
22817
  function createHttpClient(headers) {
22818
22818
  return createFetchClient({
22819
22819
  headers: {
@@ -23184,7 +23184,7 @@ ${value}`, dataLines++;
23184
23184
  }
23185
23185
  }
23186
23186
  /**
23187
- * Fetch a minimal set of current info about a Stellar account.
23187
+ * Fetch a minimal set of current info about a Digital World account.
23188
23188
  *
23189
23189
  * Needed to get the current sequence number for the account so you can build
23190
23190
  * a successful transaction with {@link TransactionBuilder}.
@@ -23208,7 +23208,7 @@ ${value}`, dataLines++;
23208
23208
  return new Account(address, entry.seqNum().toString());
23209
23209
  }
23210
23210
  /**
23211
- * Fetch the full account entry for a Stellar account.
23211
+ * Fetch the full account entry for a Digital World account.
23212
23212
  *
23213
23213
  * @param address - The public address of the account to load.
23214
23214
  * @returns Resolves to the full on-chain account
@@ -23239,7 +23239,7 @@ ${value}`, dataLines++;
23239
23239
  }
23240
23240
  }
23241
23241
  /**
23242
- * Fetch the full trustline entry for a Stellar account.
23242
+ * Fetch the full trustline entry for a Digital World account.
23243
23243
  *
23244
23244
  * @param account - The public address of the account whose trustline it is
23245
23245
  * @param asset - The trustline's asset
@@ -23279,7 +23279,7 @@ ${value}`, dataLines++;
23279
23279
  }
23280
23280
  }
23281
23281
  /**
23282
- * Fetch the full claimable balance entry for a Stellar account.
23282
+ * Fetch the full claimable balance entry for a Digital World account.
23283
23283
  *
23284
23284
  * @param id - The strkey (`B...`) or hex (`00000000abcde...`) (both
23285
23285
  * IDs with and without the 000... version prefix are accepted) of the
@@ -23909,15 +23909,15 @@ ${value}`, dataLines++;
23909
23909
  * @example
23910
23910
  * ```ts
23911
23911
  * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
23912
- * const contract = new StellarSdk.Contract(contractId);
23912
+ * const contract = new DigitalWorldSdk.Contract(contractId);
23913
23913
  *
23914
23914
  * // Right now, this is just the default fee for this example.
23915
- * const fee = StellarSdk.BASE_FEE;
23916
- * const transaction = new StellarSdk.TransactionBuilder(account, { fee })
23915
+ * const fee = DigitalWorldSdk.BASE_FEE;
23916
+ * const transaction = new DigitalWorldSdk.TransactionBuilder(account, { fee })
23917
23917
  * // Uncomment the following line to build transactions for the live network. Be
23918
23918
  * // sure to also change the horizon hostname.
23919
- * //.setNetworkPassphrase(StellarSdk.Networks.PUBLIC)
23920
- * .setNetworkPassphrase(StellarSdk.Networks.FUTURENET)
23919
+ * //.setNetworkPassphrase(DigitalWorldSdk.Networks.PUBLIC)
23920
+ * .setNetworkPassphrase(DigitalWorldSdk.Networks.FUTURENET)
23921
23921
  * .setTimeout(30) // valid for the next 30s
23922
23922
  * // Add an operation to call increment() on the contract
23923
23923
  * .addOperation(contract.call("increment"))
@@ -23993,15 +23993,15 @@ ${value}`, dataLines++;
23993
23993
  * @example
23994
23994
  * ```ts
23995
23995
  * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
23996
- * const contract = new StellarSdk.Contract(contractId);
23996
+ * const contract = new DigitalWorldSdk.Contract(contractId);
23997
23997
  *
23998
23998
  * // Right now, this is just the default fee for this example.
23999
- * const fee = StellarSdk.BASE_FEE;
24000
- * const transaction = new StellarSdk.TransactionBuilder(account, { fee })
23999
+ * const fee = DigitalWorldSdk.BASE_FEE;
24000
+ * const transaction = new DigitalWorldSdk.TransactionBuilder(account, { fee })
24001
24001
  * // Uncomment the following line to build transactions for the live network. Be
24002
24002
  * // sure to also change the horizon hostname.
24003
- * //.setNetworkPassphrase(StellarSdk.Networks.PUBLIC)
24004
- * .setNetworkPassphrase(StellarSdk.Networks.FUTURENET)
24003
+ * //.setNetworkPassphrase(DigitalWorldSdk.Networks.PUBLIC)
24004
+ * .setNetworkPassphrase(DigitalWorldSdk.Networks.FUTURENET)
24005
24005
  * .setTimeout(30) // valid for the next 30s
24006
24006
  * // Add an operation to call increment() on the contract
24007
24007
  * .addOperation(contract.call("increment"))
@@ -24012,8 +24012,8 @@ ${value}`, dataLines++;
24012
24012
  * // Sign this transaction with the secret key
24013
24013
  * // NOTE: signing is transaction is network specific. Test network transactions
24014
24014
  * // won't work in the public network. To switch networks, use the Network object
24015
- * // as explained above (look for StellarSdk.Network).
24016
- * const sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey);
24015
+ * // as explained above (look for DigitalWorldSdk.Network).
24016
+ * const sourceKeypair = DigitalWorldSdk.Keypair.fromSecret(sourceSecretKey);
24017
24017
  * preparedTransaction.sign(sourceKeypair);
24018
24018
  *
24019
24019
  * server.sendTransaction(transaction).then(result => {
@@ -24031,7 +24031,7 @@ ${value}`, dataLines++;
24031
24031
  return assembleTransaction(tx, simResponse).build();
24032
24032
  }
24033
24033
  /**
24034
- * Submit a real transaction to the Stellar network.
24034
+ * Submit a real transaction to the Digital World network.
24035
24035
  *
24036
24036
  * Unlike Horizon, RPC does not wait for transaction completion. It
24037
24037
  * simply validates the transaction and enqueues it. Clients should call
@@ -24048,15 +24048,15 @@ ${value}`, dataLines++;
24048
24048
  * @example
24049
24049
  * ```ts
24050
24050
  * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
24051
- * const contract = new StellarSdk.Contract(contractId);
24051
+ * const contract = new DigitalWorldSdk.Contract(contractId);
24052
24052
  *
24053
24053
  * // Right now, this is just the default fee for this example.
24054
- * const fee = StellarSdk.BASE_FEE;
24055
- * const transaction = new StellarSdk.TransactionBuilder(account, { fee })
24054
+ * const fee = DigitalWorldSdk.BASE_FEE;
24055
+ * const transaction = new DigitalWorldSdk.TransactionBuilder(account, { fee })
24056
24056
  * // Uncomment the following line to build transactions for the live network. Be
24057
24057
  * // sure to also change the horizon hostname.
24058
- * //.setNetworkPassphrase(StellarSdk.Networks.PUBLIC)
24059
- * .setNetworkPassphrase(StellarSdk.Networks.FUTURENET)
24058
+ * //.setNetworkPassphrase(DigitalWorldSdk.Networks.PUBLIC)
24059
+ * .setNetworkPassphrase(DigitalWorldSdk.Networks.FUTURENET)
24060
24060
  * .setTimeout(30) // valid for the next 30s
24061
24061
  * // Add an operation to call increment() on the contract
24062
24062
  * .addOperation(contract.call("increment"))
@@ -24065,8 +24065,8 @@ ${value}`, dataLines++;
24065
24065
  * // Sign this transaction with the secret key
24066
24066
  * // NOTE: signing is transaction is network specific. Test network transactions
24067
24067
  * // won't work in the public network. To switch networks, use the Network object
24068
- * // as explained above (look for StellarSdk.Network).
24069
- * const sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey);
24068
+ * // as explained above (look for DigitalWorldSdk.Network).
24069
+ * const sourceKeypair = DigitalWorldSdk.Keypair.fromSecret(sourceSecretKey);
24070
24070
  * transaction.sign(sourceKeypair);
24071
24071
  *
24072
24072
  * server.sendTransaction(transaction).then((result) => {
@@ -24122,6 +24122,11 @@ ${value}`, dataLines++;
24122
24122
  */
24123
24123
  async requestAirdrop(address, faucetUrl) {
24124
24124
  const account = typeof address === "string" ? address : address.accountId();
24125
+ if (!StrKey.isValidEd25519PublicKey(account) && !StrKey.isValidContract(account)) {
24126
+ throw new Error(
24127
+ `Invalid address: ${account}. Expected a Digital World account (G...) or contract (C...) address.`
24128
+ );
24129
+ }
24125
24130
  faucetUrl = faucetUrl || (await this.getNetwork()).friendbotUrl;
24126
24131
  if (!faucetUrl) {
24127
24132
  throw new Error("No faucet URL configured for current network");
@@ -24159,10 +24164,10 @@ ${value}`, dataLines++;
24159
24164
  *
24160
24165
  * This method supports both account (G...) and contract (C...) addresses.
24161
24166
  *
24162
- * @param address - The address to fund. Can be either a Stellar
24167
+ * @param address - The address to fund. Can be either a Digital World
24163
24168
  * account (G...) or contract (C...) address.
24164
24169
  * @param faucetUrl - (optional) Optionally, an explicit faucet URL
24165
- * (by default: this calls the Stellar RPC
24170
+ * (by default: this calls the Digital World RPC
24166
24171
  * {@link rpc.Server.getNetwork | getNetwork} method to try to
24167
24172
  * discover this network's faucet url).
24168
24173
  * @returns The transaction
@@ -24189,7 +24194,7 @@ ${value}`, dataLines++;
24189
24194
  async fundAddress(address, faucetUrl) {
24190
24195
  if (!StrKey.isValidEd25519PublicKey(address) && !StrKey.isValidContract(address)) {
24191
24196
  throw new Error(
24192
- `Invalid address: ${address}. Expected a Stellar account (G...) or contract (C...) address.`
24197
+ `Invalid address: ${address}. Expected a Digital World account (G...) or contract (C...) address.`
24193
24198
  );
24194
24199
  }
24195
24200
  faucetUrl = faucetUrl || (await this.getNetwork()).friendbotUrl;
@@ -25551,7 +25556,7 @@ ${JSON.stringify(sentTransaction)}`
25551
25556
  MuxedAddress: {
25552
25557
  type: "string",
25553
25558
  format: "address",
25554
- description: "Stellar public key with M prefix combining a G address and unique ID"
25559
+ description: "Digital World public key with M prefix combining a G address and unique ID"
25555
25560
  },
25556
25561
  ScString: {
25557
25562
  type: "string",
@@ -26736,13 +26741,13 @@ ${JSON.stringify(sentTransaction)}`
26736
26741
  if (stellarContractImports.length > 0) {
26737
26742
  const uniqueContractImports = Array.from(new Set(stellarContractImports));
26738
26743
  importLines.push(
26739
- `import {${uniqueContractImports.join(", ")}} from '@stellar/stellar-sdk/contract';`
26744
+ `import {${uniqueContractImports.join(", ")}} from '@digitalworld/digital-world-sdk/contract';`
26740
26745
  );
26741
26746
  }
26742
26747
  if (stellarImports.length > 0) {
26743
26748
  const uniqueStellarImports = Array.from(new Set(stellarImports));
26744
26749
  importLines.push(
26745
- `import {${uniqueStellarImports.join(", ")}} from '@stellar/stellar-sdk';`
26750
+ `import {${uniqueStellarImports.join(", ")}} from '@digitalworld/digital-world-sdk';`
26746
26751
  );
26747
26752
  }
26748
26753
  if (imports.needsBufferImport) {
@@ -26952,7 +26957,7 @@ ${indent} */
26952
26957
  const generatedPackageJson = {
26953
26958
  name: contractName.toLowerCase().replace(/[^a-z0-9-]/g, "-"),
26954
26959
  version: "0.0.1",
26955
- description: `Generated TypeScript bindings for ${contractName} Stellar contract`,
26960
+ description: `Generated TypeScript bindings for ${contractName} Digital World contract`,
26956
26961
  type: "module",
26957
26962
  main: "dist/index.js",
26958
26963
  types: "dist/index.d.ts",
@@ -26960,7 +26965,7 @@ ${indent} */
26960
26965
  build: "tsc"
26961
26966
  },
26962
26967
  dependencies: {
26963
- "@stellar/stellar-sdk": `^${"16.0.0"}`,
26968
+ "@stellar/stellar-sdk": `^${"16.0.1"}`,
26964
26969
  buffer: "6.0.3"
26965
26970
  },
26966
26971
  devDependencies: {
@@ -27024,7 +27029,7 @@ ${indent} */
27024
27029
  const readme = [
27025
27030
  `# ${contractName} Contract Bindings`,
27026
27031
  "",
27027
- `TypeScript bindings for the ${contractName} Stellar smart contract.`,
27032
+ `TypeScript bindings for the ${contractName} Digital World smart contract.`,
27028
27033
  "",
27029
27034
  "## Installation",
27030
27035
  "",
@@ -27061,7 +27066,7 @@ ${indent} */
27061
27066
  "- `tsconfig.json` - TypeScript configuration",
27062
27067
  "- `package.json` - NPM package configuration",
27063
27068
  "",
27064
- "This package was generated using the Js-Stellar-SDK contract binding generator."
27069
+ "This package was generated using the Digital World JS SDK contract binding generator."
27065
27070
  ].join("\n");
27066
27071
  return readme;
27067
27072
  }
@@ -27416,7 +27421,7 @@ export class Client extends ContractClient {
27416
27421
  throw new WasmFetchError("Failed to fetch WASM from hash", error);
27417
27422
  }
27418
27423
  }
27419
- function isStellarAssetContract(instance) {
27424
+ function isDigitalWorldAssetContract(instance) {
27420
27425
  return instance.executable().switch() === types.ContractExecutableType.contractExecutableStellarAsset();
27421
27426
  }
27422
27427
  async function fetchWasmFromContract(server, contractAddress) {
@@ -27432,7 +27437,7 @@ export class Client extends ContractClient {
27432
27437
  }
27433
27438
  const contractData = entry.val.contractData();
27434
27439
  const instance = contractData.val().instance();
27435
- if (isStellarAssetContract(instance)) {
27440
+ if (isDigitalWorldAssetContract(instance)) {
27436
27441
  return { type: "stellar-asset-contract" };
27437
27442
  }
27438
27443
  const wasmHash = instance.executable().wasmHash();
@@ -27533,12 +27538,12 @@ export class Client extends ContractClient {
27533
27538
  /**
27534
27539
  * Creates a BindingGenerator by fetching WASM from the network using its hash.
27535
27540
  *
27536
- * Retrieves the WASM bytecode from Stellar RPC using the WASM hash,
27541
+ * Retrieves the WASM bytecode from Digital World RPC using the WASM hash,
27537
27542
  * then parses the contract specification from it. Useful when you know
27538
27543
  * the hash of an installed WASM but don't have the binary locally.
27539
27544
  *
27540
27545
  * @param wasmHash - The hex-encoded hash of the installed WASM blob
27541
- * @param rpcServer - The Stellar RPC server instance
27546
+ * @param rpcServer - The Digital World RPC server instance
27542
27547
  * @returns A Promise resolving to a new BindingGenerator instance
27543
27548
  * @throws If the WASM cannot be fetched or doesn't contain a valid spec
27544
27549
  *
@@ -27562,11 +27567,11 @@ export class Client extends ContractClient {
27562
27567
  * Creates a BindingGenerator by fetching contract info from a deployed contract ID.
27563
27568
  *
27564
27569
  * Retrieves the contract's WASM from the network using the contract ID,
27565
- * then parses the specification. If the contract is a Stellar Asset Contract (SAC),
27570
+ * then parses the specification. If the contract is a Digital World Asset Contract (SAC),
27566
27571
  * returns a generator with the standard SAC specification.
27567
27572
  *
27568
27573
  * @param contractId - The contract ID (C... address) of the deployed contract
27569
- * @param rpcServer - The Stellar RPC server instance
27574
+ * @param rpcServer - The Digital World RPC server instance
27570
27575
  * @returns A Promise resolving to a new BindingGenerator instance
27571
27576
  * @throws If the contract cannot be found or fetched
27572
27577
  *