@oasisomniverse/web4-api 2.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/README.md +464 -0
- package/docs/README.md +52 -0
- package/docs/auth.md +89 -0
- package/docs/getting-started.md +129 -0
- package/docs/modules/Avatar.md +4160 -0
- package/docs/modules/Bridge.md +394 -0
- package/docs/modules/Chat.md +168 -0
- package/docs/modules/Clan.md +552 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Data.md +796 -0
- package/docs/modules/EOSIO.md +508 -0
- package/docs/modules/Eggs.md +396 -0
- package/docs/modules/Files.md +312 -0
- package/docs/modules/Gifts.md +306 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holochain.md +374 -0
- package/docs/modules/HyperDrive.md +3857 -0
- package/docs/modules/Karma.md +644 -0
- package/docs/modules/Keys.md +3303 -0
- package/docs/modules/Map.md +1026 -0
- package/docs/modules/Messaging.md +320 -0
- package/docs/modules/Nft.md +2216 -0
- package/docs/modules/OLand.md +425 -0
- package/docs/modules/ONET.md +442 -0
- package/docs/modules/ONODE.md +504 -0
- package/docs/modules/Provider.md +1396 -0
- package/docs/modules/Search.md +69 -0
- package/docs/modules/Seeds.md +167 -0
- package/docs/modules/Settings.md +533 -0
- package/docs/modules/Share.md +64 -0
- package/docs/modules/Social.md +190 -0
- package/docs/modules/Solana.md +150 -0
- package/docs/modules/Stats.md +359 -0
- package/docs/modules/Subscription.md +437 -0
- package/docs/modules/Video.md +150 -0
- package/docs/modules/Wallet.md +1993 -0
- package/index.d.ts +106 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +120 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +50 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +46 -0
- package/src/modules/Auth.d.ts +28 -0
- package/src/modules/Auth.js +98 -0
- package/src/modules/Avatar.d.ts +192 -0
- package/src/modules/Avatar.js +143 -0
- package/src/modules/Bridge.d.ts +24 -0
- package/src/modules/Bridge.js +35 -0
- package/src/modules/Cargo.js +35 -0
- package/src/modules/Chat.d.ts +15 -0
- package/src/modules/Chat.js +27 -0
- package/src/modules/Clan.d.ts +36 -0
- package/src/modules/Clan.js +41 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Core.js +27 -0
- package/src/modules/Data.d.ts +36 -0
- package/src/modules/Data.js +41 -0
- package/src/modules/EOSIO.d.ts +33 -0
- package/src/modules/EOSIO.js +39 -0
- package/src/modules/Eggs.d.ts +24 -0
- package/src/modules/Eggs.js +33 -0
- package/src/modules/Files.d.ts +24 -0
- package/src/modules/Files.js +33 -0
- package/src/modules/Gifts.d.ts +24 -0
- package/src/modules/Gifts.js +33 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holochain.d.ts +27 -0
- package/src/modules/Holochain.js +35 -0
- package/src/modules/HyperDrive.d.ts +237 -0
- package/src/modules/HyperDrive.js +175 -0
- package/src/modules/Karma.d.ts +42 -0
- package/src/modules/Karma.js +45 -0
- package/src/modules/Keys.d.ts +183 -0
- package/src/modules/Keys.js +139 -0
- package/src/modules/Map.d.ts +75 -0
- package/src/modules/Map.js +65 -0
- package/src/modules/Messaging.d.ts +24 -0
- package/src/modules/Messaging.js +33 -0
- package/src/modules/Nft.d.ts +102 -0
- package/src/modules/Nft.js +85 -0
- package/src/modules/OAPP.js +31 -0
- package/src/modules/OLand.d.ts +27 -0
- package/src/modules/OLand.js +35 -0
- package/src/modules/ONET.d.ts +39 -0
- package/src/modules/ONET.js +43 -0
- package/src/modules/ONODE.d.ts +45 -0
- package/src/modules/ONODE.js +47 -0
- package/src/modules/Provider.d.ts +99 -0
- package/src/modules/Provider.js +83 -0
- package/src/modules/Search.d.ts +9 -0
- package/src/modules/Search.js +23 -0
- package/src/modules/Seeds.d.ts +15 -0
- package/src/modules/Seeds.js +27 -0
- package/src/modules/Settings.d.ts +48 -0
- package/src/modules/Settings.js +47 -0
- package/src/modules/Share.d.ts +9 -0
- package/src/modules/Share.js +23 -0
- package/src/modules/Social.d.ts +18 -0
- package/src/modules/Social.js +29 -0
- package/src/modules/Solana.d.ts +12 -0
- package/src/modules/Solana.js +25 -0
- package/src/modules/Stats.d.ts +30 -0
- package/src/modules/Stats.js +37 -0
- package/src/modules/Subscription.d.ts +36 -0
- package/src/modules/Subscription.js +41 -0
- package/src/modules/Telos.js +39 -0
- package/src/modules/Video.d.ts +15 -0
- package/src/modules/Video.js +27 -0
- package/src/modules/Wallet.d.ts +102 -0
- package/src/modules/Wallet.js +85 -0
- package/src/modules/index.js +79 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// AUTO-GENERATED by scripts/generate-modules.js from endpoints.json - do not hand-edit.
|
|
4
|
+
// Regenerate with: node scripts/generate-modules.js
|
|
5
|
+
|
|
6
|
+
const { makeOperation } = require('../core/routeHelper');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Generated wrapper for api/wallet (source: ONODE WebAPI WalletController.cs).
|
|
10
|
+
* Every method takes a single args object: path-template tokens (e.g. {id})
|
|
11
|
+
* are consumed from it automatically; any remaining keys are sent as the
|
|
12
|
+
* query string (GET/DELETE) or JSON body (POST/PUT).
|
|
13
|
+
*/
|
|
14
|
+
class WalletModule {
|
|
15
|
+
constructor(http) {
|
|
16
|
+
this._http = http;
|
|
17
|
+
|
|
18
|
+
// POST api/wallet/avatar/email/{email}/create-wallet
|
|
19
|
+
this.createWalletForAvatarByEmailAsync = makeOperation(http, "api/wallet", "POST", "avatar/email/{email}/create-wallet");
|
|
20
|
+
// POST api/wallet/avatar/{avatarId}/create-wallet
|
|
21
|
+
this.createWalletForAvatarByIdAsync = makeOperation(http, "api/wallet", "POST", "avatar/{avatarId}/create-wallet");
|
|
22
|
+
// POST api/wallet/avatar/username/{username}/create-wallet
|
|
23
|
+
this.createWalletForAvatarByUsernameAsync = makeOperation(http, "api/wallet", "POST", "avatar/username/{username}/create-wallet");
|
|
24
|
+
// GET api/wallet/avatar/email/{email}/default-wallet
|
|
25
|
+
this.getAvatarDefaultWalletByEmailAsync = makeOperation(http, "api/wallet", "GET", "avatar/email/{email}/default-wallet");
|
|
26
|
+
// GET api/wallet/avatar/{id}/default-wallet
|
|
27
|
+
this.getAvatarDefaultWalletByIdAsync = makeOperation(http, "api/wallet", "GET", "avatar/{id}/default-wallet");
|
|
28
|
+
// GET api/wallet/avatar/username/{username}/default-wallet/{showOnlyDefault}/{decryptPrivateKeys}
|
|
29
|
+
this.getAvatarDefaultWalletByUsernameAsync = makeOperation(http, "api/wallet", "GET", "avatar/username/{username}/default-wallet/{showOnlyDefault}/{decryptPrivateKeys}");
|
|
30
|
+
// GET api/wallet/avatar/{avatarId}/portfolio/value
|
|
31
|
+
this.getPortfolioValueAsync = makeOperation(http, "api/wallet", "GET", "avatar/{avatarId}/portfolio/value");
|
|
32
|
+
// GET api/wallet/supported-chains
|
|
33
|
+
this.getSupportedChains = makeOperation(http, "api/wallet", "GET", "supported-chains");
|
|
34
|
+
// GET api/wallet/avatar/{avatarId}/wallet/{walletId}/analytics
|
|
35
|
+
this.getWalletAnalyticsAsync = makeOperation(http, "api/wallet", "GET", "avatar/{avatarId}/wallet/{walletId}/analytics");
|
|
36
|
+
// GET api/wallet/find-wallet
|
|
37
|
+
this.getWalletThatPublicKeyBelongsTo = makeOperation(http, "api/wallet", "GET", "find-wallet");
|
|
38
|
+
// GET api/wallet/avatar/{avatarId}/wallet/{walletId}/tokens
|
|
39
|
+
this.getWalletTokensAsync = makeOperation(http, "api/wallet", "GET", "avatar/{avatarId}/wallet/{walletId}/tokens");
|
|
40
|
+
// GET api/wallet/avatar/{avatarId}/wallets/chain/{chain}
|
|
41
|
+
this.getWalletsByChainAsync = makeOperation(http, "api/wallet", "GET", "avatar/{avatarId}/wallets/chain/{chain}");
|
|
42
|
+
// POST api/wallet/avatar/email/{email}/import/private-key
|
|
43
|
+
this.importWalletUsingPrivateKeyByEmail = makeOperation(http, "api/wallet", "POST", "avatar/email/{email}/import/private-key");
|
|
44
|
+
// POST api/wallet/avatar/{avatarId}/import/private-key
|
|
45
|
+
this.importWalletUsingPrivateKeyById = makeOperation(http, "api/wallet", "POST", "avatar/{avatarId}/import/private-key");
|
|
46
|
+
// POST api/wallet/avatar/username/{username}/import/private-key
|
|
47
|
+
this.importWalletUsingPrivateKeyByUsername = makeOperation(http, "api/wallet", "POST", "avatar/username/{username}/import/private-key");
|
|
48
|
+
// POST api/wallet/avatar/email/{email}/import/public-key
|
|
49
|
+
this.importWalletUsingPublicKeyByEmail = makeOperation(http, "api/wallet", "POST", "avatar/email/{email}/import/public-key");
|
|
50
|
+
// POST api/wallet/avatar/{avatarId}/import/public-key
|
|
51
|
+
this.importWalletUsingPublicKeyById = makeOperation(http, "api/wallet", "POST", "avatar/{avatarId}/import/public-key");
|
|
52
|
+
// POST api/wallet/avatar/username/{username}/import/public-key
|
|
53
|
+
this.importWalletUsingPublicKeyByUsername = makeOperation(http, "api/wallet", "POST", "avatar/username/{username}/import/public-key");
|
|
54
|
+
// GET api/wallet/avatar/email/{email}/wallets
|
|
55
|
+
this.loadProviderWalletsForAvatarByEmailAsync = makeOperation(http, "api/wallet", "GET", "avatar/email/{email}/wallets");
|
|
56
|
+
// GET api/wallet/avatar/{id}/wallets/{showOnlyDefault}/{decryptPrivateKeys}
|
|
57
|
+
this.loadProviderWalletsForAvatarByIdAsync = makeOperation(http, "api/wallet", "GET", "avatar/{id}/wallets/{showOnlyDefault}/{decryptPrivateKeys}");
|
|
58
|
+
// GET api/wallet/avatar/username/{username}/wallets/{showOnlyDefault}/{decryptPrivateKeys}
|
|
59
|
+
this.loadProviderWalletsForAvatarByUsernameAsync = makeOperation(http, "api/wallet", "GET", "avatar/username/{username}/wallets/{showOnlyDefault}/{decryptPrivateKeys}");
|
|
60
|
+
// POST api/wallet/avatar/email/{email}/wallets
|
|
61
|
+
this.saveProviderWalletsForAvatarByEmailAsync = makeOperation(http, "api/wallet", "POST", "avatar/email/{email}/wallets");
|
|
62
|
+
// POST api/wallet/avatar/{id}/wallets
|
|
63
|
+
this.saveProviderWalletsForAvatarByIdAsync = makeOperation(http, "api/wallet", "POST", "avatar/{id}/wallets");
|
|
64
|
+
// POST api/wallet/avatar/username/{username}/wallets
|
|
65
|
+
this.saveProviderWalletsForAvatarByUsernameAsync = makeOperation(http, "api/wallet", "POST", "avatar/username/{username}/wallets");
|
|
66
|
+
// POST api/wallet/send_token
|
|
67
|
+
this.sendTokenAsync = makeOperation(http, "api/wallet", "POST", "send_token");
|
|
68
|
+
// POST api/wallet/avatar/email/{email}/default-wallet/{walletId}
|
|
69
|
+
this.setAvatarDefaultWalletByEmailAsync = makeOperation(http, "api/wallet", "POST", "avatar/email/{email}/default-wallet/{walletId}");
|
|
70
|
+
// POST api/wallet/avatar/{id}/default-wallet/{walletId}
|
|
71
|
+
this.setAvatarDefaultWalletByIdAsync = makeOperation(http, "api/wallet", "POST", "avatar/{id}/default-wallet/{walletId}");
|
|
72
|
+
// POST api/wallet/avatar/username/{username}/default-wallet/{walletId}
|
|
73
|
+
this.setAvatarDefaultWalletByUsernameAsync = makeOperation(http, "api/wallet", "POST", "avatar/username/{username}/default-wallet/{walletId}");
|
|
74
|
+
// POST api/wallet/transfer
|
|
75
|
+
this.transferBetweenWalletsAsync = makeOperation(http, "api/wallet", "POST", "transfer");
|
|
76
|
+
// PUT api/wallet/avatar/email/{email}/wallet/{walletId}
|
|
77
|
+
this.updateWalletForAvatarByEmailAsync = makeOperation(http, "api/wallet", "PUT", "avatar/email/{email}/wallet/{walletId}");
|
|
78
|
+
// PUT api/wallet/avatar/{avatarId}/wallet/{walletId}
|
|
79
|
+
this.updateWalletForAvatarByIdAsync = makeOperation(http, "api/wallet", "PUT", "avatar/{avatarId}/wallet/{walletId}");
|
|
80
|
+
// PUT api/wallet/avatar/username/{username}/wallet/{walletId}
|
|
81
|
+
this.updateWalletForAvatarByUsernameAsync = makeOperation(http, "api/wallet", "PUT", "avatar/username/{username}/wallet/{walletId}");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
module.exports = { WalletModule };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// AUTO-GENERATED by scripts/generate-modules.js - do not hand-edit.
|
|
4
|
+
const { AvatarModule } = require('./Avatar');
|
|
5
|
+
const { BridgeModule } = require('./Bridge');
|
|
6
|
+
const { ChatModule } = require('./Chat');
|
|
7
|
+
const { ClanModule } = require('./Clan');
|
|
8
|
+
const { CompetitionModule } = require('./Competition');
|
|
9
|
+
const { DataModule } = require('./Data');
|
|
10
|
+
const { EOSIOModule } = require('./EOSIO');
|
|
11
|
+
const { EggsModule } = require('./Eggs');
|
|
12
|
+
const { FilesModule } = require('./Files');
|
|
13
|
+
const { GiftsModule } = require('./Gifts');
|
|
14
|
+
const { HealthModule } = require('./Health');
|
|
15
|
+
const { HolochainModule } = require('./Holochain');
|
|
16
|
+
const { HyperDriveModule } = require('./HyperDrive');
|
|
17
|
+
const { KarmaModule } = require('./Karma');
|
|
18
|
+
const { KeysModule } = require('./Keys');
|
|
19
|
+
const { MapModule } = require('./Map');
|
|
20
|
+
const { MessagingModule } = require('./Messaging');
|
|
21
|
+
const { NftModule } = require('./Nft');
|
|
22
|
+
const { OLandModule } = require('./OLand');
|
|
23
|
+
const { ONETModule } = require('./ONET');
|
|
24
|
+
const { ONODEModule } = require('./ONODE');
|
|
25
|
+
const { ProviderModule } = require('./Provider');
|
|
26
|
+
const { SearchModule } = require('./Search');
|
|
27
|
+
const { SeedsModule } = require('./Seeds');
|
|
28
|
+
const { SettingsModule } = require('./Settings');
|
|
29
|
+
const { ShareModule } = require('./Share');
|
|
30
|
+
const { SocialModule } = require('./Social');
|
|
31
|
+
const { SolanaModule } = require('./Solana');
|
|
32
|
+
const { StatsModule } = require('./Stats');
|
|
33
|
+
const { SubscriptionModule } = require('./Subscription');
|
|
34
|
+
const { VideoModule } = require('./Video');
|
|
35
|
+
const { WalletModule } = require('./Wallet');
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Attaches every generated module to the client under its lowerCamel controller
|
|
39
|
+
* name (e.g. client.nft, client.wallet, client.hyperDrive). Hand-written ergonomic
|
|
40
|
+
* modules (auth/avatar/data/karma) are attached separately in src/index.js and take
|
|
41
|
+
* precedence where names overlap.
|
|
42
|
+
*/
|
|
43
|
+
function attachGeneratedModules(client, http) {
|
|
44
|
+
client.avatar = client.avatar || new AvatarModule(http);
|
|
45
|
+
client.bridge = client.bridge || new BridgeModule(http);
|
|
46
|
+
client.chat = client.chat || new ChatModule(http);
|
|
47
|
+
client.clan = client.clan || new ClanModule(http);
|
|
48
|
+
client.competition = client.competition || new CompetitionModule(http);
|
|
49
|
+
client.data = client.data || new DataModule(http);
|
|
50
|
+
client.eOSIO = client.eOSIO || new EOSIOModule(http);
|
|
51
|
+
client.eggs = client.eggs || new EggsModule(http);
|
|
52
|
+
client.files = client.files || new FilesModule(http);
|
|
53
|
+
client.gifts = client.gifts || new GiftsModule(http);
|
|
54
|
+
client.health = client.health || new HealthModule(http);
|
|
55
|
+
client.holochain = client.holochain || new HolochainModule(http);
|
|
56
|
+
client.hyperDrive = client.hyperDrive || new HyperDriveModule(http);
|
|
57
|
+
client.karma = client.karma || new KarmaModule(http);
|
|
58
|
+
client.keys = client.keys || new KeysModule(http);
|
|
59
|
+
client.map = client.map || new MapModule(http);
|
|
60
|
+
client.messaging = client.messaging || new MessagingModule(http);
|
|
61
|
+
client.nft = client.nft || new NftModule(http);
|
|
62
|
+
client.oLand = client.oLand || new OLandModule(http);
|
|
63
|
+
client.oNET = client.oNET || new ONETModule(http);
|
|
64
|
+
client.oNODE = client.oNODE || new ONODEModule(http);
|
|
65
|
+
client.provider = client.provider || new ProviderModule(http);
|
|
66
|
+
client.search = client.search || new SearchModule(http);
|
|
67
|
+
client.seeds = client.seeds || new SeedsModule(http);
|
|
68
|
+
client.settings = client.settings || new SettingsModule(http);
|
|
69
|
+
client.share = client.share || new ShareModule(http);
|
|
70
|
+
client.social = client.social || new SocialModule(http);
|
|
71
|
+
client.solana = client.solana || new SolanaModule(http);
|
|
72
|
+
client.stats = client.stats || new StatsModule(http);
|
|
73
|
+
client.subscription = client.subscription || new SubscriptionModule(http);
|
|
74
|
+
client.video = client.video || new VideoModule(http);
|
|
75
|
+
client.wallet = client.wallet || new WalletModule(http);
|
|
76
|
+
return client;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
module.exports = { attachGeneratedModules };
|