@stellar/stellar-sdk 13.0.0-rc.2 → 13.0.0

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.
@@ -11063,6 +11063,12 @@ exports.walkInvocationTree = walkInvocationTree;
11063
11063
  var _asset = __webpack_require__(1764);
11064
11064
  var _address = __webpack_require__(1180);
11065
11065
  var _scval = __webpack_require__(7177);
11066
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11067
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11068
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11069
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11070
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
11071
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11066
11072
  /**
11067
11073
  * @typedef CreateInvocation
11068
11074
  *
@@ -11076,6 +11082,9 @@ var _scval = __webpack_require__(7177);
11076
11082
  * @prop {string} wasm.address contract address of this deployment
11077
11083
  * @prop {string} wasm.salt hex salt that the user consumed when creating
11078
11084
  * this contract (encoded in the resulting address)
11085
+ * @prop {any[]} [wasm.constructorArgs] a list of natively-represented values
11086
+ * (see {@link scValToNative}) that are passed to the constructor when
11087
+ * creating this contract
11079
11088
  */
11080
11089
 
11081
11090
  /**
@@ -11084,8 +11093,8 @@ var _scval = __webpack_require__(7177);
11084
11093
  * @prop {string} source the strkey of the contract (C...) being invoked
11085
11094
  * @prop {string} function the name of the function being invoked
11086
11095
  * @prop {any[]} args the natively-represented parameters to the function
11087
- * invocation (see {@link scValToNative}) for rules on how they're
11088
- * represented a JS types
11096
+ * invocation (see {@link scValToNative} for rules on how they're
11097
+ * represented a JS types)
11089
11098
  */
11090
11099
 
11091
11100
  /**
@@ -11146,7 +11155,7 @@ function buildInvocationTree(root) {
11146
11155
  /** @type {InvocationTree} */
11147
11156
  var output = {};
11148
11157
 
11149
- /** @type {xdr.CreateContractArgs | xdr.InvokeContractArgs} */
11158
+ /** @type {xdr.CreateContractArgs|xdr.CreateContractArgsV2|xdr.InvokeContractArgs} */
11150
11159
  var inner = fn.value();
11151
11160
  switch (fn["switch"]().value) {
11152
11161
  // sorobanAuthorizedFunctionTypeContractFn
@@ -11162,8 +11171,11 @@ function buildInvocationTree(root) {
11162
11171
  break;
11163
11172
 
11164
11173
  // sorobanAuthorizedFunctionTypeCreateContractHostFn
11165
- case 1:
11174
+ // sorobanAuthorizedFunctionTypeCreateContractV2HostFn
11175
+ case 1: // fallthrough: just no ctor args in V1
11176
+ case 2:
11166
11177
  {
11178
+ var createV2 = fn["switch"]().value === 2;
11167
11179
  output.type = 'create';
11168
11180
  output.args = {};
11169
11181
 
@@ -11187,11 +11199,15 @@ function buildInvocationTree(root) {
11187
11199
  /** @type {xdr.ContractIdPreimageFromAddress} */
11188
11200
  var details = preimage.fromAddress();
11189
11201
  output.args.type = 'wasm';
11190
- output.args.wasm = {
11202
+ output.args.wasm = _objectSpread({
11191
11203
  salt: details.salt().toString('hex'),
11192
11204
  hash: exec.wasmHash().toString('hex'),
11193
11205
  address: _address.Address.fromScAddress(details.address()).toString()
11194
- };
11206
+ }, createV2 && {
11207
+ constructorArgs: inner.constructorArgs().map(function (arg) {
11208
+ return (0, _scval.scValToNative)(arg);
11209
+ })
11210
+ });
11195
11211
  break;
11196
11212
  }
11197
11213
 
@@ -27714,7 +27730,7 @@ var http_client = __webpack_require__(9983);
27714
27730
  function horizon_axios_client_typeof(o) { "@babel/helpers - typeof"; return horizon_axios_client_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, horizon_axios_client_typeof(o); }
27715
27731
 
27716
27732
 
27717
- var version = "13.0.0-rc.2";
27733
+ var version = "13.0.0";
27718
27734
  var SERVER_TIME_MAP = {};
27719
27735
  var AxiosClient = (0,http_client/* create */.vt)({
27720
27736
  headers: {
@@ -33735,7 +33751,7 @@ var lib = __webpack_require__(356);
33735
33751
  var http_client = __webpack_require__(9983);
33736
33752
  ;// ./src/rpc/axios.ts
33737
33753
 
33738
- var version = "13.0.0-rc.2";
33754
+ var version = "13.0.0";
33739
33755
  var AxiosClient = (0,http_client/* create */.vt)({
33740
33756
  headers: {
33741
33757
  'X-Client-Name': 'js-soroban-client',