@ocap/client 1.18.34 → 1.18.35
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/dist/base.js +1 -1
- package/dist/browser.d.ts +41 -31
- package/dist/bundle.js +1 -1
- package/dist/report.html +2 -2
- package/dist/schema/graphql.json +186 -50
- package/dist/schema/graphql.txt +2 -2
- package/dist/types.js +84 -77
- package/dist/types.js.map +1 -1
- package/docs/QUERIES.md +8 -0
- package/docs/README.md +118 -111
- package/lib/base.js +1 -1
- package/lib/node.d.ts +41 -31
- package/lib/schema/graphql.json +186 -50
- package/lib/schema/graphql.txt +2 -2
- package/lib/types.js +84 -77
- package/lib/types.js.map +1 -1
- package/package.json +12 -12
package/lib/types.js
CHANGED
|
@@ -833,6 +833,28 @@
|
|
|
833
833
|
* @property {...GraphQLClient.Any} data
|
|
834
834
|
*/
|
|
835
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Structure of GraphQLClient.CloseRollupTx
|
|
838
|
+
*
|
|
839
|
+
* Checkout the following snippet for the format of CloseRollupTx:
|
|
840
|
+
* ```json
|
|
841
|
+
{
|
|
842
|
+
"rollup": "abc",
|
|
843
|
+
"message": "abc",
|
|
844
|
+
"data": {
|
|
845
|
+
"typeUrl": "abc",
|
|
846
|
+
"value": "abc"
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
* ```
|
|
850
|
+
*
|
|
851
|
+
* @memberof GraphQLClient
|
|
852
|
+
* @typedef {object} GraphQLClient.CloseRollupTx
|
|
853
|
+
* @property {string} rollup
|
|
854
|
+
* @property {string} message
|
|
855
|
+
* @property {...GraphQLClient.Any} data
|
|
856
|
+
*/
|
|
857
|
+
|
|
836
858
|
/**
|
|
837
859
|
* Structure of GraphQLClient.ConsensusParams
|
|
838
860
|
*
|
|
@@ -899,6 +921,7 @@
|
|
|
899
921
|
* @property {Array<...GraphQLClient.Multisig>} signatures
|
|
900
922
|
* @property {string} rollup
|
|
901
923
|
* @property {string} minReward
|
|
924
|
+
* @property {boolean} governance
|
|
902
925
|
* @property {...GraphQLClient.Any} data
|
|
903
926
|
*/
|
|
904
927
|
|
|
@@ -909,6 +932,7 @@
|
|
|
909
932
|
* @typedef {object} GraphQLClient.CreateRollupTx
|
|
910
933
|
* @property {string} address
|
|
911
934
|
* @property {string} tokenAddress
|
|
935
|
+
* @property {string} vaultAddress
|
|
912
936
|
* @property {string} contractAddress
|
|
913
937
|
* @property {Array<...GraphQLClient.RollupValidator>} seedValidators
|
|
914
938
|
* @property {string} minStakeAmount
|
|
@@ -1374,6 +1398,7 @@
|
|
|
1374
1398
|
* @property {string} mintedAmount
|
|
1375
1399
|
* @property {string} burnedAmount
|
|
1376
1400
|
* @property {string} rewardAmount
|
|
1401
|
+
* @property {boolean} governance
|
|
1377
1402
|
* @property {...GraphQLClient.IndexedTokenInput} tokenInfo
|
|
1378
1403
|
* @property {...GraphQLClient.Any} data
|
|
1379
1404
|
*/
|
|
@@ -1385,6 +1410,7 @@
|
|
|
1385
1410
|
* @typedef {object} GraphQLClient.IndexedRollupState
|
|
1386
1411
|
* @property {string} address
|
|
1387
1412
|
* @property {string} tokenAddress
|
|
1413
|
+
* @property {string} vaultAddress
|
|
1388
1414
|
* @property {string} contractAddress
|
|
1389
1415
|
* @property {Array<...GraphQLClient.RollupValidator>} seedValidators
|
|
1390
1416
|
* @property {Array<...GraphQLClient.RollupValidator>} validators
|
|
@@ -1422,6 +1448,8 @@
|
|
|
1422
1448
|
* @property {number} publishWaitingPeriod
|
|
1423
1449
|
* @property {number} publishSlashRate
|
|
1424
1450
|
* @property {Array<string>} migrateHistory
|
|
1451
|
+
* @property {boolean} closed
|
|
1452
|
+
* @property {Array<string>} vaultHistory
|
|
1425
1453
|
* @property {...GraphQLClient.Any} data
|
|
1426
1454
|
*/
|
|
1427
1455
|
|
|
@@ -1552,40 +1580,15 @@
|
|
|
1552
1580
|
*/
|
|
1553
1581
|
|
|
1554
1582
|
/**
|
|
1555
|
-
* Structure of GraphQLClient.
|
|
1556
|
-
*
|
|
1557
|
-
* Checkout the following snippet for the format of MigrateRollupContractTx:
|
|
1558
|
-
* ```json
|
|
1559
|
-
{
|
|
1560
|
-
"rollup": "abc",
|
|
1561
|
-
"to": "abc",
|
|
1562
|
-
"data": {
|
|
1563
|
-
"typeUrl": "abc",
|
|
1564
|
-
"value": "abc"
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
* ```
|
|
1568
|
-
*
|
|
1569
|
-
* @memberof GraphQLClient
|
|
1570
|
-
* @typedef {object} GraphQLClient.MigrateRollupContractTx
|
|
1571
|
-
* @property {string} rollup
|
|
1572
|
-
* @property {string} to
|
|
1573
|
-
* @property {...GraphQLClient.Any} data
|
|
1574
|
-
*/
|
|
1575
|
-
|
|
1576
|
-
/**
|
|
1577
|
-
* Structure of GraphQLClient.MigrateRollupTokenTx
|
|
1583
|
+
* Structure of GraphQLClient.MigrateRollupTx
|
|
1578
1584
|
*
|
|
1579
|
-
* Checkout the following snippet for the format of
|
|
1585
|
+
* Checkout the following snippet for the format of MigrateRollupTx:
|
|
1580
1586
|
* ```json
|
|
1581
1587
|
{
|
|
1582
1588
|
"rollup": "abc",
|
|
1583
|
-
"from": "abc",
|
|
1584
1589
|
"to": "abc",
|
|
1585
|
-
"
|
|
1586
|
-
|
|
1587
|
-
"value": "abc"
|
|
1588
|
-
},
|
|
1590
|
+
"type": "abc",
|
|
1591
|
+
"message": "abc",
|
|
1589
1592
|
"data": {
|
|
1590
1593
|
"typeUrl": "abc",
|
|
1591
1594
|
"value": "abc"
|
|
@@ -1594,11 +1597,11 @@
|
|
|
1594
1597
|
* ```
|
|
1595
1598
|
*
|
|
1596
1599
|
* @memberof GraphQLClient
|
|
1597
|
-
* @typedef {object} GraphQLClient.
|
|
1600
|
+
* @typedef {object} GraphQLClient.MigrateRollupTx
|
|
1598
1601
|
* @property {string} rollup
|
|
1599
|
-
* @property {string} from
|
|
1600
1602
|
* @property {string} to
|
|
1601
|
-
* @property {
|
|
1603
|
+
* @property {string} type
|
|
1604
|
+
* @property {string} message
|
|
1602
1605
|
* @property {...GraphQLClient.Any} data
|
|
1603
1606
|
*/
|
|
1604
1607
|
|
|
@@ -2185,6 +2188,7 @@
|
|
|
2185
2188
|
* @property {string} burnedAmount
|
|
2186
2189
|
* @property {string} rewardAmount
|
|
2187
2190
|
* @property {string} minReward
|
|
2191
|
+
* @property {boolean} governance
|
|
2188
2192
|
* @property {...GraphQLClient.StateContext} context
|
|
2189
2193
|
* @property {...GraphQLClient.Any} data
|
|
2190
2194
|
*/
|
|
@@ -2196,6 +2200,7 @@
|
|
|
2196
2200
|
* @typedef {object} GraphQLClient.RollupState
|
|
2197
2201
|
* @property {string} address
|
|
2198
2202
|
* @property {string} tokenAddress
|
|
2203
|
+
* @property {string} vaultAddress
|
|
2199
2204
|
* @property {string} contractAddress
|
|
2200
2205
|
* @property {Array<...GraphQLClient.RollupValidator>} seedValidators
|
|
2201
2206
|
* @property {Array<...GraphQLClient.RollupValidator>} validators
|
|
@@ -2231,6 +2236,8 @@
|
|
|
2231
2236
|
* @property {number} publishWaitingPeriod
|
|
2232
2237
|
* @property {number} publishSlashRate
|
|
2233
2238
|
* @property {Array<string>} migrateHistory
|
|
2239
|
+
* @property {boolean} closed
|
|
2240
|
+
* @property {Array<string>} vaultHistory
|
|
2234
2241
|
* @property {...GraphQLClient.StateContext} context
|
|
2235
2242
|
* @property {...GraphQLClient.Any} data
|
|
2236
2243
|
*/
|
|
@@ -3410,6 +3417,33 @@
|
|
|
3410
3417
|
* @returns {Promise<string>} returns transaction hash if success, otherwise error was thrown
|
|
3411
3418
|
*/
|
|
3412
3419
|
|
|
3420
|
+
/**
|
|
3421
|
+
* @memberof GraphQLClient
|
|
3422
|
+
* @typedef {Object} GraphQLClient.CloseRollupTxInput
|
|
3423
|
+
* @prop {object} input
|
|
3424
|
+
* @prop {object} input.tx - data of the transaction
|
|
3425
|
+
* @prop {GraphQLClient.CloseRollupTx} input.tx.itx - the actual transaction object
|
|
3426
|
+
* @prop {string} [input.tx.pk] - the sender pk
|
|
3427
|
+
* @prop {string} [input.tx.from] - the sender address, can be derived from wallet
|
|
3428
|
+
* @prop {number} [input.tx.nonce] - the tx nonce, defaults to Date.now if not set
|
|
3429
|
+
* @prop {string} [input.tx.chainId] - the chainId
|
|
3430
|
+
* @prop {string} [input.tx.signature] - transaction signature
|
|
3431
|
+
* @prop {array} [input.tx.signatures] - transaction signatures, should be set when it's a multisig transaction
|
|
3432
|
+
* @prop {object} input.wallet - the wallet used to sign the transaction, either a forge managed wallet or user managed wallet
|
|
3433
|
+
* @prop {string} [input.signature] - the signature of the tx, if this parameter exist, we will not sign the transaction
|
|
3434
|
+
*/
|
|
3435
|
+
|
|
3436
|
+
/**
|
|
3437
|
+
* Send CloseRollupTx transaction and get the hash, use {@link GraphQLClient#getTx} to get transaction detail
|
|
3438
|
+
*
|
|
3439
|
+
* @memberof GraphQLClient
|
|
3440
|
+
* @function
|
|
3441
|
+
* @name GraphQLClient#sendCloseRollupTx
|
|
3442
|
+
* @param {GraphQLClient.CloseRollupTxInput} params
|
|
3443
|
+
* @param {object} extra
|
|
3444
|
+
* @returns {Promise<string>} returns transaction hash if success, otherwise error was thrown
|
|
3445
|
+
*/
|
|
3446
|
+
|
|
3413
3447
|
/**
|
|
3414
3448
|
* @memberof GraphQLClient
|
|
3415
3449
|
* @typedef {Object} GraphQLClient.CreateAssetTxInput
|
|
@@ -3736,10 +3770,10 @@
|
|
|
3736
3770
|
|
|
3737
3771
|
/**
|
|
3738
3772
|
* @memberof GraphQLClient
|
|
3739
|
-
* @typedef {Object} GraphQLClient.
|
|
3773
|
+
* @typedef {Object} GraphQLClient.MigrateRollupTxInput
|
|
3740
3774
|
* @prop {object} input
|
|
3741
3775
|
* @prop {object} input.tx - data of the transaction
|
|
3742
|
-
* @prop {GraphQLClient.
|
|
3776
|
+
* @prop {GraphQLClient.MigrateRollupTx} input.tx.itx - the actual transaction object
|
|
3743
3777
|
* @prop {string} [input.tx.pk] - the sender pk
|
|
3744
3778
|
* @prop {string} [input.tx.from] - the sender address, can be derived from wallet
|
|
3745
3779
|
* @prop {number} [input.tx.nonce] - the tx nonce, defaults to Date.now if not set
|
|
@@ -3751,39 +3785,12 @@
|
|
|
3751
3785
|
*/
|
|
3752
3786
|
|
|
3753
3787
|
/**
|
|
3754
|
-
* Send
|
|
3788
|
+
* Send MigrateRollupTx transaction and get the hash, use {@link GraphQLClient#getTx} to get transaction detail
|
|
3755
3789
|
*
|
|
3756
3790
|
* @memberof GraphQLClient
|
|
3757
3791
|
* @function
|
|
3758
|
-
* @name GraphQLClient#
|
|
3759
|
-
* @param {GraphQLClient.
|
|
3760
|
-
* @param {object} extra
|
|
3761
|
-
* @returns {Promise<string>} returns transaction hash if success, otherwise error was thrown
|
|
3762
|
-
*/
|
|
3763
|
-
|
|
3764
|
-
/**
|
|
3765
|
-
* @memberof GraphQLClient
|
|
3766
|
-
* @typedef {Object} GraphQLClient.MigrateRollupTokenTxInput
|
|
3767
|
-
* @prop {object} input
|
|
3768
|
-
* @prop {object} input.tx - data of the transaction
|
|
3769
|
-
* @prop {GraphQLClient.MigrateRollupTokenTx} input.tx.itx - the actual transaction object
|
|
3770
|
-
* @prop {string} [input.tx.pk] - the sender pk
|
|
3771
|
-
* @prop {string} [input.tx.from] - the sender address, can be derived from wallet
|
|
3772
|
-
* @prop {number} [input.tx.nonce] - the tx nonce, defaults to Date.now if not set
|
|
3773
|
-
* @prop {string} [input.tx.chainId] - the chainId
|
|
3774
|
-
* @prop {string} [input.tx.signature] - transaction signature
|
|
3775
|
-
* @prop {array} [input.tx.signatures] - transaction signatures, should be set when it's a multisig transaction
|
|
3776
|
-
* @prop {object} input.wallet - the wallet used to sign the transaction, either a forge managed wallet or user managed wallet
|
|
3777
|
-
* @prop {string} [input.signature] - the signature of the tx, if this parameter exist, we will not sign the transaction
|
|
3778
|
-
*/
|
|
3779
|
-
|
|
3780
|
-
/**
|
|
3781
|
-
* Send MigrateRollupTokenTx transaction and get the hash, use {@link GraphQLClient#getTx} to get transaction detail
|
|
3782
|
-
*
|
|
3783
|
-
* @memberof GraphQLClient
|
|
3784
|
-
* @function
|
|
3785
|
-
* @name GraphQLClient#sendMigrateRollupTokenTx
|
|
3786
|
-
* @param {GraphQLClient.MigrateRollupTokenTxInput} params
|
|
3792
|
+
* @name GraphQLClient#sendMigrateRollupTx
|
|
3793
|
+
* @param {GraphQLClient.MigrateRollupTxInput} params
|
|
3787
3794
|
* @param {object} extra
|
|
3788
3795
|
* @returns {Promise<string>} returns transaction hash if success, otherwise error was thrown
|
|
3789
3796
|
*/
|
|
@@ -4216,6 +4223,16 @@
|
|
|
4216
4223
|
* @returns {Promise<GraphQLClient.TxEncodeOutput>} result - we provide two formats of the encoding result, binary presentation and human readable object
|
|
4217
4224
|
*/
|
|
4218
4225
|
|
|
4226
|
+
/**
|
|
4227
|
+
* Encode a CloseRollupTx transaction for later use
|
|
4228
|
+
*
|
|
4229
|
+
* @name GraphQLClient#encodeCloseRollupTx
|
|
4230
|
+
* @function
|
|
4231
|
+
* @memberof GraphQLClient
|
|
4232
|
+
* @param {GraphQLClient.CloseRollupTxInput} params
|
|
4233
|
+
* @returns {Promise<GraphQLClient.TxEncodeOutput>} result - we provide two formats of the encoding result, binary presentation and human readable object
|
|
4234
|
+
*/
|
|
4235
|
+
|
|
4219
4236
|
/**
|
|
4220
4237
|
* Encode a CreateAssetTx transaction for later use
|
|
4221
4238
|
*
|
|
@@ -4337,22 +4354,12 @@
|
|
|
4337
4354
|
*/
|
|
4338
4355
|
|
|
4339
4356
|
/**
|
|
4340
|
-
* Encode a
|
|
4341
|
-
*
|
|
4342
|
-
* @name GraphQLClient#encodeMigrateRollupContractTx
|
|
4343
|
-
* @function
|
|
4344
|
-
* @memberof GraphQLClient
|
|
4345
|
-
* @param {GraphQLClient.MigrateRollupContractTxInput} params
|
|
4346
|
-
* @returns {Promise<GraphQLClient.TxEncodeOutput>} result - we provide two formats of the encoding result, binary presentation and human readable object
|
|
4347
|
-
*/
|
|
4348
|
-
|
|
4349
|
-
/**
|
|
4350
|
-
* Encode a MigrateRollupTokenTx transaction for later use
|
|
4357
|
+
* Encode a MigrateRollupTx transaction for later use
|
|
4351
4358
|
*
|
|
4352
|
-
* @name GraphQLClient#
|
|
4359
|
+
* @name GraphQLClient#encodeMigrateRollupTx
|
|
4353
4360
|
* @function
|
|
4354
4361
|
* @memberof GraphQLClient
|
|
4355
|
-
* @param {GraphQLClient.
|
|
4362
|
+
* @param {GraphQLClient.MigrateRollupTxInput} params
|
|
4356
4363
|
* @returns {Promise<GraphQLClient.TxEncodeOutput>} result - we provide two formats of the encoding result, binary presentation and human readable object
|
|
4357
4364
|
*/
|
|
4358
4365
|
|