@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.
- package/CHANGELOG.md +98 -3
- package/dist/stellar-sdk-minimal.js +24 -8
- package/dist/stellar-sdk-minimal.min.js +1 -1
- package/dist/stellar-sdk-no-axios.js +24 -8
- package/dist/stellar-sdk-no-axios.min.js +1 -1
- package/dist/stellar-sdk-no-eventsource.js +24 -8
- package/dist/stellar-sdk-no-eventsource.min.js +1 -1
- package/dist/stellar-sdk.js +24 -8
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/horizon/horizon_axios_client.js +1 -1
- package/lib/minimal/horizon/horizon_axios_client.js +1 -1
- package/lib/minimal/rpc/axios.js +1 -1
- package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
- package/lib/no-axios/rpc/axios.js +1 -1
- package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
- package/lib/no-eventsource/rpc/axios.js +1 -1
- package/lib/rpc/axios.js +1 -1
- package/package.json +2 -2
package/dist/stellar-sdk.js
CHANGED
|
@@ -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}
|
|
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
|
|
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
|
-
|
|
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
|
|
27733
|
+
var version = "13.0.0";
|
|
27718
27734
|
var SERVER_TIME_MAP = {};
|
|
27719
27735
|
var AxiosClient = (0,http_client/* create */.vt)({
|
|
27720
27736
|
headers: {
|
|
@@ -33738,7 +33754,7 @@ var lib = __webpack_require__(356);
|
|
|
33738
33754
|
var http_client = __webpack_require__(9983);
|
|
33739
33755
|
;// ./src/rpc/axios.ts
|
|
33740
33756
|
|
|
33741
|
-
var version = "13.0.0
|
|
33757
|
+
var version = "13.0.0";
|
|
33742
33758
|
var AxiosClient = (0,http_client/* create */.vt)({
|
|
33743
33759
|
headers: {
|
|
33744
33760
|
'X-Client-Name': 'js-soroban-client',
|